diff --git a/adsense/v2/adsense-api.json b/adsense/v2/adsense-api.json index c7e401a55f9..1e6323b9fae 100644 --- a/adsense/v2/adsense-api.json +++ b/adsense/v2/adsense-api.json @@ -1828,7 +1828,7 @@ } } }, - "revision": "20230403", + "revision": "20230531", "rootUrl": "https://adsense.googleapis.com/", "schemas": { "Account": { @@ -1987,7 +1987,7 @@ "type": "string" }, "state": { - "description": "State of the ad unit.", + "description": "Required. State of the ad unit.", "enum": [ "STATE_UNSPECIFIED", "ACTIVE", diff --git a/adsense/v2/adsense-gen.go b/adsense/v2/adsense-gen.go index 9e98267d7ec..1fcc35092e1 100644 --- a/adsense/v2/adsense-gen.go +++ b/adsense/v2/adsense-gen.go @@ -485,7 +485,7 @@ type AdUnit struct { // in the `AD_UNIT_ID` reporting dimension. ReportingDimensionId string `json:"reportingDimensionId,omitempty"` - // State: State of the ad unit. + // State: Required. State of the ad unit. // // Possible values: // "STATE_UNSPECIFIED" - State unspecified. diff --git a/billingbudgets/v1/billingbudgets-api.json b/billingbudgets/v1/billingbudgets-api.json index a508528bbe4..d4d42bea485 100644 --- a/billingbudgets/v1/billingbudgets-api.json +++ b/billingbudgets/v1/billingbudgets-api.json @@ -270,7 +270,7 @@ } } }, - "revision": "20221019", + "revision": "20230529", "rootUrl": "https://billingbudgets.googleapis.com/", "schemas": { "GoogleCloudBillingBudgetsV1Budget": { @@ -406,6 +406,13 @@ }, "type": "array" }, + "resourceAncestors": { + "description": "Optional. A set of folder and organization names of the form `folders/{folderId}` or `organizations/{organizationId}`, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the report includes all usage for all organizations, regardless of which organization the usage occurred on.", + "items": { + "type": "string" + }, + "type": "array" + }, "services": { "description": "Optional. A set of services of the form `services/{service_id}`, specifying that usage from only this set of services should be included in the budget. If omitted, the report includes usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.", "items": { diff --git a/billingbudgets/v1/billingbudgets-gen.go b/billingbudgets/v1/billingbudgets-gen.go index 89cb974f38d..d4d87884adf 100644 --- a/billingbudgets/v1/billingbudgets-gen.go +++ b/billingbudgets/v1/billingbudgets-gen.go @@ -373,6 +373,14 @@ type GoogleCloudBillingBudgetsV1Filter struct { // project the usage occurred on. Projects []string `json:"projects,omitempty"` + // ResourceAncestors: Optional. A set of folder and organization names + // of the form `folders/{folderId}` or `organizations/{organizationId}`, + // specifying that usage from only this set of folders and organizations + // should be included in the budget. If omitted, the report includes all + // usage for all organizations, regardless of which organization the + // usage occurred on. + ResourceAncestors []string `json:"resourceAncestors,omitempty"` + // Services: Optional. A set of services of the form // `services/{service_id}`, specifying that usage from only this set of // services should be included in the budget. If omitted, the report diff --git a/billingbudgets/v1beta1/billingbudgets-api.json b/billingbudgets/v1beta1/billingbudgets-api.json index bad8e7274e8..cc884f9663c 100644 --- a/billingbudgets/v1beta1/billingbudgets-api.json +++ b/billingbudgets/v1beta1/billingbudgets-api.json @@ -264,7 +264,7 @@ } } }, - "revision": "20221019", + "revision": "20230529", "rootUrl": "https://billingbudgets.googleapis.com/", "schemas": { "GoogleCloudBillingBudgetsV1beta1AllUpdatesRule": { @@ -437,6 +437,13 @@ }, "type": "array" }, + "resourceAncestors": { + "description": "Optional. A set of folder and organization names of the form `folders/{folderId}` or `organizations/{organizationId}`, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the report includes all usage for all organizations, regardless of which organization the usage occurred on.", + "items": { + "type": "string" + }, + "type": "array" + }, "services": { "description": "Optional. A set of services of the form `services/{service_id}`, specifying that usage from only this set of services should be included in the budget. If omitted, the report will include usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.", "items": { diff --git a/billingbudgets/v1beta1/billingbudgets-gen.go b/billingbudgets/v1beta1/billingbudgets-gen.go index daa30fb570c..1e651807350 100644 --- a/billingbudgets/v1beta1/billingbudgets-gen.go +++ b/billingbudgets/v1beta1/billingbudgets-gen.go @@ -469,6 +469,14 @@ type GoogleCloudBillingBudgetsV1beta1Filter struct { // project the usage occurred on. Projects []string `json:"projects,omitempty"` + // ResourceAncestors: Optional. A set of folder and organization names + // of the form `folders/{folderId}` or `organizations/{organizationId}`, + // specifying that usage from only this set of folders and organizations + // should be included in the budget. If omitted, the report includes all + // usage for all organizations, regardless of which organization the + // usage occurred on. + ResourceAncestors []string `json:"resourceAncestors,omitempty"` + // Services: Optional. A set of services of the form // `services/{service_id}`, specifying that usage from only this set of // services should be included in the budget. If omitted, the report diff --git a/cloudidentity/v1/cloudidentity-api.json b/cloudidentity/v1/cloudidentity-api.json index b768f9d95b3..b0ba955e869 100644 --- a/cloudidentity/v1/cloudidentity-api.json +++ b/cloudidentity/v1/cloudidentity-api.json @@ -1501,7 +1501,12 @@ "path": "v1/{+parent}/memberships:searchDirectGroups", "response": { "$ref": "SearchDirectGroupsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.groups", + "https://www.googleapis.com/auth/cloud-identity.groups.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] }, "searchTransitiveGroups": { "description": "Search transitive groups of a member. **Note:** This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium accounts. If the account of the member is not one of these, a 403 (PERMISSION_DENIED) HTTP status code will be returned. A transitive group is any group that has a direct or indirect membership to the member. Actor must have view permissions all transitive groups.", @@ -1985,7 +1990,7 @@ } } }, - "revision": "20230328", + "revision": "20230530", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index 1f7ccfecf38..77a4ddff325 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -10496,7 +10496,12 @@ func (c *GroupsMembershipsSearchDirectGroupsCall) Do(opts ...googleapi.CallOptio // "path": "v1/{+parent}/memberships:searchDirectGroups", // "response": { // "$ref": "SearchDirectGroupsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity.groups", + // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", + // "https://www.googleapis.com/auth/cloud-platform" + // ] // } } diff --git a/cloudidentity/v1beta1/cloudidentity-api.json b/cloudidentity/v1beta1/cloudidentity-api.json index 7f2284c0b18..5d3cefd1c23 100644 --- a/cloudidentity/v1beta1/cloudidentity-api.json +++ b/cloudidentity/v1beta1/cloudidentity-api.json @@ -1450,7 +1450,12 @@ "path": "v1beta1/{+parent}/memberships:searchDirectGroups", "response": { "$ref": "SearchDirectGroupsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.groups", + "https://www.googleapis.com/auth/cloud-identity.groups.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] }, "searchTransitiveGroups": { "description": "Search transitive groups of a member. **Note:** This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium accounts. A transitive group is any group that has a direct or indirect membership to the member. Actor must have view permissions all transitive groups.", @@ -2010,7 +2015,7 @@ } } }, - "revision": "20230523", + "revision": "20230530", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { diff --git a/cloudidentity/v1beta1/cloudidentity-gen.go b/cloudidentity/v1beta1/cloudidentity-gen.go index a4edb92c13d..950064a2c42 100644 --- a/cloudidentity/v1beta1/cloudidentity-gen.go +++ b/cloudidentity/v1beta1/cloudidentity-gen.go @@ -11238,7 +11238,12 @@ func (c *GroupsMembershipsSearchDirectGroupsCall) Do(opts ...googleapi.CallOptio // "path": "v1beta1/{+parent}/memberships:searchDirectGroups", // "response": { // "$ref": "SearchDirectGroupsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity.groups", + // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", + // "https://www.googleapis.com/auth/cloud-platform" + // ] // } } diff --git a/datacatalog/v1/datacatalog-api.json b/datacatalog/v1/datacatalog-api.json index 76670e89087..8fcb0ae39fe 100644 --- a/datacatalog/v1/datacatalog-api.json +++ b/datacatalog/v1/datacatalog-api.json @@ -2144,7 +2144,7 @@ } } }, - "revision": "20230512", + "revision": "20230526", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { @@ -3152,6 +3152,10 @@ "gcsBucketPath": { "description": "Path to a Cloud Storage bucket that contains a dump ready for ingestion.", "type": "string" + }, + "jobId": { + "description": "Optional. (Optional) Dataplex task job id, if specified will be used as part of ImportEntries LRO ID", + "type": "string" } }, "type": "object" diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index 63f6d725b64..05866d8efc5 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -2068,6 +2068,10 @@ type GoogleCloudDatacatalogV1ImportEntriesRequest struct { // ready for ingestion. GcsBucketPath string `json:"gcsBucketPath,omitempty"` + // JobId: Optional. (Optional) Dataplex task job id, if specified will + // be used as part of ImportEntries LRO ID + JobId string `json:"jobId,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsBucketPath") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index eb143b6de35..84e69e87d72 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -617,9 +617,111 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateDataset": { + "description": "Updates metadata associated with a dataset.", + "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/dataset", + "httpMethod": "PATCH", + "id": "documentai.projects.locations.processors.updateDataset", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The update mask applies to the resource.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta3/{+name}", + "request": { + "$ref": "GoogleCloudDocumentaiV1beta3Dataset" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { + "dataset": { + "methods": { + "getDatasetSchema": { + "description": "Gets the DatasetSchema of a Dataset.", + "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/dataset/datasetSchema", + "httpMethod": "GET", + "id": "documentai.projects.locations.processors.dataset.getDatasetSchema", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/datasetSchema$", + "required": true, + "type": "string" + }, + "visibleFieldsOnly": { + "description": "If set, only returns the visible fields of the schema.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta3/{+name}", + "response": { + "$ref": "GoogleCloudDocumentaiV1beta3DatasetSchema" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateDatasetSchema": { + "description": "Updates a DatasetSchema.", + "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/dataset/datasetSchema", + "httpMethod": "PATCH", + "id": "documentai.projects.locations.processors.dataset.updateDatasetSchema", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Dataset schema resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/datasetSchema$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The update mask applies to the resource.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta3/{+name}", + "request": { + "$ref": "GoogleCloudDocumentaiV1beta3DatasetSchema" + }, + "response": { + "$ref": "GoogleCloudDocumentaiV1beta3DatasetSchema" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "humanReviewConfig": { "methods": { "reviewDocument": { @@ -1012,7 +1114,7 @@ } } }, - "revision": "20230519", + "revision": "20230526", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -5222,6 +5324,104 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3Dataset": { + "description": "A singleton resource under a `Processor` which configs a collection of documents.", + "id": "GoogleCloudDocumentaiV1beta3Dataset", + "properties": { + "documentWarehouseConfig": { + "$ref": "GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig", + "description": "Optional. Document Warehouse-based dataset config." + }, + "gcsManagedConfig": { + "$ref": "GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig", + "description": "Optional. User managed GCS dataset config. Use this config if the dataset documents are stored under a user managed GCS location." + }, + "name": { + "description": "Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset`", + "type": "string" + }, + "spannerIndexingConfig": { + "$ref": "GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig", + "description": "Optional. A lightweight indexing source with low latency and high reliablity, but lack advanced features like CMEK and content based search." + }, + "state": { + "description": "Required. State of the dataset. Will be ignored when updating dataset.", + "enum": [ + "STATE_UNSPECIFIED", + "UNINITIALIZED", + "INITIALIZING", + "INITIALIZED" + ], + "enumDescriptions": [ + "Default unspecified enum, should not be used.", + "Dataset has not been initialized.", + "Dataset is being initialized.", + "Dataset has been initialized." + ], + "type": "string" + }, + "unmanagedDatasetConfig": { + "$ref": "GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig", + "description": "Optional. Unmanaged dataset config. Use this config if the dataset documents are managed by the document service internally (not user managed)." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig": { + "description": "Config specific to the Document Warehouse-based implementation.", + "id": "GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig", + "properties": { + "collection": { + "description": "Output only. The collection in Document Warehouse associated with the dataset.", + "readOnly": true, + "type": "string" + }, + "schema": { + "description": "Output only. The schema in Document Warehouse associated with the dataset.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig": { + "description": "Config specific to the GCS-based implementation.", + "id": "GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig", + "properties": { + "gcsPrefix": { + "$ref": "GoogleCloudDocumentaiV1beta3GcsPrefix", + "description": "Required. The Cloud Storage uri (a directory) where the documents belonging to the dataset must be stored." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DatasetSchema": { + "description": "Dataset Schema.", + "id": "GoogleCloudDocumentaiV1beta3DatasetSchema", + "properties": { + "documentSchema": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchema", + "description": "Optional. Schema of the dataset." + }, + "name": { + "description": "Dataset schema resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig": { + "description": "Config specific to spanner based indexing.", + "id": "GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig": { + "description": "Config specific to unmanaged config", + "id": "GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig", + "properties": {}, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata": { "description": "The long-running operation metadata for the DeleteProcessor method.", "id": "GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata", @@ -6399,6 +6599,10 @@ "description": "User defined name for the type.", "type": "string" }, + "entityTypeMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3EntityTypeMetadata", + "description": "Metadata for the entity type." + }, "enumValues": { "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues", "description": "If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is \u003e10 or could change frequently use the `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file." @@ -6457,6 +6661,10 @@ ], "type": "string" }, + "propertyMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3PropertyMetadata", + "description": "Any additional metadata about the property can be added here." + }, "valueType": { "description": "A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field.", "type": "string" @@ -6644,6 +6852,17 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3EntityTypeMetadata": { + "description": "Metadata about an entity type.", + "id": "GoogleCloudDocumentaiV1beta3EntityTypeMetadata", + "properties": { + "inactive": { + "description": "Whether the entity type should be considered as \"inactive\".", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata": { "description": "Metadata of the EvaluateProcessorVersion method.", "id": "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata", @@ -7437,6 +7656,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3PropertyMetadata": { + "description": "Metadata about a property.", + "id": "GoogleCloudDocumentaiV1beta3PropertyMetadata", + "properties": { + "inactive": { + "description": "Whether the property should be considered as \"inactive\".", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3RawDocument": { "description": "Payload message of raw document content (bytes).", "id": "GoogleCloudDocumentaiV1beta3RawDocument", diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 890c96d80be..9c1a2fd5151 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -188,6 +188,7 @@ type ProjectsLocationsProcessorTypesService struct { func NewProjectsLocationsProcessorsService(s *Service) *ProjectsLocationsProcessorsService { rs := &ProjectsLocationsProcessorsService{s: s} + rs.Dataset = NewProjectsLocationsProcessorsDatasetService(s) rs.HumanReviewConfig = NewProjectsLocationsProcessorsHumanReviewConfigService(s) rs.ProcessorVersions = NewProjectsLocationsProcessorsProcessorVersionsService(s) return rs @@ -196,11 +197,22 @@ func NewProjectsLocationsProcessorsService(s *Service) *ProjectsLocationsProcess type ProjectsLocationsProcessorsService struct { s *Service + Dataset *ProjectsLocationsProcessorsDatasetService + HumanReviewConfig *ProjectsLocationsProcessorsHumanReviewConfigService ProcessorVersions *ProjectsLocationsProcessorsProcessorVersionsService } +func NewProjectsLocationsProcessorsDatasetService(s *Service) *ProjectsLocationsProcessorsDatasetService { + rs := &ProjectsLocationsProcessorsDatasetService{s: s} + return rs +} + +type ProjectsLocationsProcessorsDatasetService struct { + s *Service +} + func NewProjectsLocationsProcessorsHumanReviewConfigService(s *Service) *ProjectsLocationsProcessorsHumanReviewConfigService { rs := &ProjectsLocationsProcessorsHumanReviewConfigService{s: s} return rs @@ -7380,6 +7392,180 @@ func (s *GoogleCloudDocumentaiV1beta3CommonOperationMetadata) MarshalJSON() ([]b return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3Dataset: A singleton resource under a +// `Processor` which configs a collection of documents. +type GoogleCloudDocumentaiV1beta3Dataset struct { + // DocumentWarehouseConfig: Optional. Document Warehouse-based dataset + // config. + DocumentWarehouseConfig *GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig `json:"documentWarehouseConfig,omitempty"` + + // GcsManagedConfig: Optional. User managed GCS dataset config. Use this + // config if the dataset documents are stored under a user managed GCS + // location. + GcsManagedConfig *GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig `json:"gcsManagedConfig,omitempty"` + + // Name: Dataset resource name. Format: + // `projects/{project}/locations/{location}/processors/{processor}/datase + // t` + Name string `json:"name,omitempty"` + + // SpannerIndexingConfig: Optional. A lightweight indexing source with + // low latency and high reliablity, but lack advanced features like CMEK + // and content based search. + SpannerIndexingConfig *GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig `json:"spannerIndexingConfig,omitempty"` + + // State: Required. State of the dataset. Will be ignored when updating + // dataset. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified enum, should not be used. + // "UNINITIALIZED" - Dataset has not been initialized. + // "INITIALIZING" - Dataset is being initialized. + // "INITIALIZED" - Dataset has been initialized. + State string `json:"state,omitempty"` + + // UnmanagedDatasetConfig: Optional. Unmanaged dataset config. Use this + // config if the dataset documents are managed by the document service + // internally (not user managed). + UnmanagedDatasetConfig *GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig `json:"unmanagedDatasetConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DocumentWarehouseConfig") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DocumentWarehouseConfig") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3Dataset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3Dataset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig: Config +// specific to the Document Warehouse-based implementation. +type GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig struct { + // Collection: Output only. The collection in Document Warehouse + // associated with the dataset. + Collection string `json:"collection,omitempty"` + + // Schema: Output only. The schema in Document Warehouse associated with + // the dataset. + Schema string `json:"schema,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Collection") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Collection") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig: Config specific +// to the GCS-based implementation. +type GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig struct { + // GcsPrefix: Required. The Cloud Storage uri (a directory) where the + // documents belonging to the dataset must be stored. + GcsPrefix *GoogleCloudDocumentaiV1beta3GcsPrefix `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3DatasetSchema: Dataset Schema. +type GoogleCloudDocumentaiV1beta3DatasetSchema struct { + // DocumentSchema: Optional. Schema of the dataset. + DocumentSchema *GoogleCloudDocumentaiV1beta3DocumentSchema `json:"documentSchema,omitempty"` + + // Name: Dataset schema resource name. Format: + // `projects/{project}/locations/{location}/processors/{processor}/datase + // t/datasetSchema` + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DocumentSchema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DocumentSchema") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3DatasetSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DatasetSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig: Config +// specific to spanner based indexing. +type GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig struct { +} + +// GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig: Config +// specific to unmanaged config +type GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig struct { +} + // GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata: The long-running // operation metadata for the DeleteProcessor method. type GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata struct { @@ -9222,6 +9408,9 @@ type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType struct { // DisplayName: User defined name for the type. DisplayName string `json:"displayName,omitempty"` + // EntityTypeMetadata: Metadata for the entity type. + EntityTypeMetadata *GoogleCloudDocumentaiV1beta3EntityTypeMetadata `json:"entityTypeMetadata,omitempty"` + // EnumValues: If specified, lists all the possible values for this // entity. This should not be more than a handful of values. If the // number of values is >10 or could change frequently use the @@ -9318,6 +9507,10 @@ type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty struct { // times. OccurrenceType string `json:"occurrenceType,omitempty"` + // PropertyMetadata: Any additional metadata about the property can be + // added here. + PropertyMetadata *GoogleCloudDocumentaiV1beta3PropertyMetadata `json:"propertyMetadata,omitempty"` + // ValueType: A reference to the value type of the property. This type // is subject to the same conventions as the `Entity.base_types` field. ValueType string `json:"valueType,omitempty"` @@ -9681,6 +9874,35 @@ type GoogleCloudDocumentaiV1beta3EnableProcessorRequest struct { type GoogleCloudDocumentaiV1beta3EnableProcessorResponse struct { } +// GoogleCloudDocumentaiV1beta3EntityTypeMetadata: Metadata about an +// entity type. +type GoogleCloudDocumentaiV1beta3EntityTypeMetadata struct { + // Inactive: Whether the entity type should be considered as "inactive". + Inactive bool `json:"inactive,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Inactive") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Inactive") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3EntityTypeMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3EntityTypeMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata: // Metadata of the EvaluateProcessorVersion method. type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata struct { @@ -11135,6 +11357,35 @@ func (s *GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo) MarshalJSO return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3PropertyMetadata: Metadata about a +// property. +type GoogleCloudDocumentaiV1beta3PropertyMetadata struct { + // Inactive: Whether the property should be considered as "inactive". + Inactive bool `json:"inactive,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Inactive") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Inactive") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3PropertyMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3PropertyMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3RawDocument: Payload message of raw // document content (bytes). type GoogleCloudDocumentaiV1beta3RawDocument struct { @@ -15033,6 +15284,484 @@ func (c *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall) Do(opts ...g } +// method id "documentai.projects.locations.processors.updateDataset": + +type ProjectsLocationsProcessorsUpdateDatasetCall struct { + s *Service + name string + googleclouddocumentaiv1beta3dataset *GoogleCloudDocumentaiV1beta3Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateDataset: Updates metadata associated with a dataset. +// +// - name: Dataset resource name. Format: +// `projects/{project}/locations/{location}/processors/{processor}/data +// set`. +func (r *ProjectsLocationsProcessorsService) UpdateDataset(name string, googleclouddocumentaiv1beta3dataset *GoogleCloudDocumentaiV1beta3Dataset) *ProjectsLocationsProcessorsUpdateDatasetCall { + c := &ProjectsLocationsProcessorsUpdateDatasetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddocumentaiv1beta3dataset = googleclouddocumentaiv1beta3dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": The update mask +// applies to the resource. +func (c *ProjectsLocationsProcessorsUpdateDatasetCall) UpdateMask(updateMask string) *ProjectsLocationsProcessorsUpdateDatasetCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsProcessorsUpdateDatasetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsUpdateDatasetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsProcessorsUpdateDatasetCall) Context(ctx context.Context) *ProjectsLocationsProcessorsUpdateDatasetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsProcessorsUpdateDatasetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProcessorsUpdateDatasetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1beta3dataset) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "documentai.projects.locations.processors.updateDataset" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsProcessorsUpdateDatasetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates metadata associated with a dataset.", + // "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/dataset", + // "httpMethod": "PATCH", + // "id": "documentai.projects.locations.processors.updateDataset", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The update mask applies to the resource.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta3/{+name}", + // "request": { + // "$ref": "GoogleCloudDocumentaiV1beta3Dataset" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "documentai.projects.locations.processors.dataset.getDatasetSchema": + +type ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetDatasetSchema: Gets the DatasetSchema of a Dataset. +// +// - name: The dataset schema resource name. Format: +// projects/{project}/locations/{location}/processors/{processor}/datas +// et/datasetSchema. +func (r *ProjectsLocationsProcessorsDatasetService) GetDatasetSchema(name string) *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall { + c := &ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// VisibleFieldsOnly sets the optional parameter "visibleFieldsOnly": If +// set, only returns the visible fields of the schema. +func (c *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall) VisibleFieldsOnly(visibleFieldsOnly bool) *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall { + c.urlParams_.Set("visibleFieldsOnly", fmt.Sprint(visibleFieldsOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall) Context(ctx context.Context) *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "documentai.projects.locations.processors.dataset.getDatasetSchema" call. +// Exactly one of *GoogleCloudDocumentaiV1beta3DatasetSchema or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDocumentaiV1beta3DatasetSchema.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsProcessorsDatasetGetDatasetSchemaCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1beta3DatasetSchema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDocumentaiV1beta3DatasetSchema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the DatasetSchema of a Dataset.", + // "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/dataset/datasetSchema", + // "httpMethod": "GET", + // "id": "documentai.projects.locations.processors.dataset.getDatasetSchema", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/datasetSchema$", + // "required": true, + // "type": "string" + // }, + // "visibleFieldsOnly": { + // "description": "If set, only returns the visible fields of the schema.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta3/{+name}", + // "response": { + // "$ref": "GoogleCloudDocumentaiV1beta3DatasetSchema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "documentai.projects.locations.processors.dataset.updateDatasetSchema": + +type ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall struct { + s *Service + name string + googleclouddocumentaiv1beta3datasetschema *GoogleCloudDocumentaiV1beta3DatasetSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateDatasetSchema: Updates a DatasetSchema. +// +// - name: Dataset schema resource name. Format: +// `projects/{project}/locations/{location}/processors/{processor}/data +// set/datasetSchema`. +func (r *ProjectsLocationsProcessorsDatasetService) UpdateDatasetSchema(name string, googleclouddocumentaiv1beta3datasetschema *GoogleCloudDocumentaiV1beta3DatasetSchema) *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall { + c := &ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddocumentaiv1beta3datasetschema = googleclouddocumentaiv1beta3datasetschema + return c +} + +// UpdateMask sets the optional parameter "updateMask": The update mask +// applies to the resource. +func (c *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall) UpdateMask(updateMask string) *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall) Context(ctx context.Context) *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1beta3datasetschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "documentai.projects.locations.processors.dataset.updateDatasetSchema" call. +// Exactly one of *GoogleCloudDocumentaiV1beta3DatasetSchema or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDocumentaiV1beta3DatasetSchema.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsProcessorsDatasetUpdateDatasetSchemaCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1beta3DatasetSchema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDocumentaiV1beta3DatasetSchema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a DatasetSchema.", + // "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/dataset/datasetSchema", + // "httpMethod": "PATCH", + // "id": "documentai.projects.locations.processors.dataset.updateDatasetSchema", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Dataset schema resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/datasetSchema$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The update mask applies to the resource.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta3/{+name}", + // "request": { + // "$ref": "GoogleCloudDocumentaiV1beta3DatasetSchema" + // }, + // "response": { + // "$ref": "GoogleCloudDocumentaiV1beta3DatasetSchema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "documentai.projects.locations.processors.humanReviewConfig.reviewDocument": type ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall struct { diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 9966b204d26..c8976c557c7 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4941,7 +4941,7 @@ } } }, - "revision": "20230510", + "revision": "20230519", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "Action": { @@ -6017,6 +6017,13 @@ "description": "An entity mention in the document.", "id": "EntityMention", "properties": { + "additionalInfo": { + "description": "Additional information about the entity mention. For example, for an entity mention of type `DATE` this can be its more specific date types from the following list: `ADMISSION_DATE`, `CONSULTATION_DATE`, `DISCHARGE_DATE`, `SERVICE_DATE`, `VISIT_DATE`, `DIAGNOSIS_DATE`, `MED_STARTED_DATE`, `MED_ENDED_DATE`, `NOTE_DATE`, `PROCEDURE_DATE`, `RADIATION_STARTED_DATE`, `RADIATION_ENDED_DATE`, `STAGE_DATE`", + "items": { + "$ref": "Feature" + }, + "type": "array" + }, "certaintyAssessment": { "$ref": "Feature", "description": "The certainty assessment of the entity mention. Its value is one of: LIKELY, SOMEWHAT_LIKELY, UNCERTAIN, SOMEWHAT_UNLIKELY, UNLIKELY, CONDITIONAL" diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index eb7c45938c2..922cb6a8827 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -2426,6 +2426,15 @@ func (s *Entity) MarshalJSON() ([]byte, error) { // EntityMention: An entity mention in the document. type EntityMention struct { + // AdditionalInfo: Additional information about the entity mention. For + // example, for an entity mention of type `DATE` this can be its more + // specific date types from the following list: `ADMISSION_DATE`, + // `CONSULTATION_DATE`, `DISCHARGE_DATE`, `SERVICE_DATE`, `VISIT_DATE`, + // `DIAGNOSIS_DATE`, `MED_STARTED_DATE`, `MED_ENDED_DATE`, `NOTE_DATE`, + // `PROCEDURE_DATE`, `RADIATION_STARTED_DATE`, `RADIATION_ENDED_DATE`, + // `STAGE_DATE` + AdditionalInfo []*Feature `json:"additionalInfo,omitempty"` + // CertaintyAssessment: The certainty assessment of the entity mention. // Its value is one of: LIKELY, SOMEWHAT_LIKELY, UNCERTAIN, // SOMEWHAT_UNLIKELY, UNLIKELY, CONDITIONAL @@ -2468,15 +2477,15 @@ type EntityMention struct { // UNCLEAR_FOLLOWUP. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertaintyAssessment") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AdditionalInfo") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertaintyAssessment") to + // NullFields is a list of field names (e.g. "AdditionalInfo") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index e4124d50070..f8ff4f1a30e 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -648,11 +648,41 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "validateAttributeExpression": { + "description": "Validates a given CEL expression conforms to IAP restrictions.", + "flatPath": "v1/{v1Id}:validateAttributeExpression", + "httpMethod": "POST", + "id": "iap.validateAttributeExpression", + "parameterOrder": [ + "name" + ], + "parameters": { + "expression": { + "description": "Required. User input string expression. Should be of the form 'attributes.saml_attributes.filter(attribute, attribute.name in ['{attribute_name}', '{attribute_name}'])'", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the IAP protected resource.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:validateAttributeExpression", + "response": { + "$ref": "ValidateIapAttributeExpressionResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } }, - "revision": "20230407", + "revision": "20230526", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -1224,6 +1254,12 @@ } }, "type": "object" + }, + "ValidateIapAttributeExpressionResponse": { + "description": "API requires a return message, but currently all response strings will fit in the status and public message. In the future, this response can hold AST validation info.", + "id": "ValidateIapAttributeExpressionResponse", + "properties": {}, + "type": "object" } }, "servicePath": "", diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 0120d93879f..51180ca7598 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -1499,6 +1499,16 @@ func (s *TunnelDestGroup) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ValidateIapAttributeExpressionResponse: API requires a return +// message, but currently all response strings will fit in the status +// and public message. In the future, this response can hold AST +// validation info. +type ValidateIapAttributeExpressionResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // method id "iap.projects.brands.create": type ProjectsBrandsCreateCall struct { @@ -4279,3 +4289,151 @@ func (c *V1UpdateIapSettingsCall) Do(opts ...googleapi.CallOption) (*IapSettings // } } + +// method id "iap.validateAttributeExpression": + +type V1ValidateAttributeExpressionCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ValidateAttributeExpression: Validates a given CEL expression +// conforms to IAP restrictions. +// +// - name: The resource name of the IAP protected resource. +func (r *V1Service) ValidateAttributeExpression(name string) *V1ValidateAttributeExpressionCall { + c := &V1ValidateAttributeExpressionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Expression sets the optional parameter "expression": Required. User +// input string expression. Should be of the form +// 'attributes.saml_attributes.filter(attribute, attribute.name in +// ['{attribute_name}', '{attribute_name}'])' +func (c *V1ValidateAttributeExpressionCall) Expression(expression string) *V1ValidateAttributeExpressionCall { + c.urlParams_.Set("expression", expression) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *V1ValidateAttributeExpressionCall) Fields(s ...googleapi.Field) *V1ValidateAttributeExpressionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *V1ValidateAttributeExpressionCall) Context(ctx context.Context) *V1ValidateAttributeExpressionCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *V1ValidateAttributeExpressionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *V1ValidateAttributeExpressionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:validateAttributeExpression") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "iap.validateAttributeExpression" call. +// Exactly one of *ValidateIapAttributeExpressionResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ValidateIapAttributeExpressionResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *V1ValidateAttributeExpressionCall) Do(opts ...googleapi.CallOption) (*ValidateIapAttributeExpressionResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ValidateIapAttributeExpressionResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Validates a given CEL expression conforms to IAP restrictions.", + // "flatPath": "v1/{v1Id}:validateAttributeExpression", + // "httpMethod": "POST", + // "id": "iap.validateAttributeExpression", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "expression": { + // "description": "Required. User input string expression. Should be of the form 'attributes.saml_attributes.filter(attribute, attribute.name in ['{attribute_name}', '{attribute_name}'])'", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the IAP protected resource.", + // "location": "path", + // "pattern": "^.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:validateAttributeExpression", + // "response": { + // "$ref": "ValidateIapAttributeExpressionResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/language/v1/language-api.json b/language/v1/language-api.json index b796575a1df..1e239c11b0e 100644 --- a/language/v1/language-api.json +++ b/language/v1/language-api.json @@ -223,11 +223,30 @@ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ] + }, + "moderateText": { + "description": "Moderates a document for harmful and sensitive categories.", + "flatPath": "v1/documents:moderateText", + "httpMethod": "POST", + "id": "language.documents.moderateText", + "parameterOrder": [], + "parameters": {}, + "path": "v1/documents:moderateText", + "request": { + "$ref": "ModerateTextRequest" + }, + "response": { + "$ref": "ModerateTextResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ] } } } }, - "revision": "20230424", + "revision": "20230527", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -478,6 +497,13 @@ "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.", "type": "string" }, + "moderationCategories": { + "description": "Harmful and sensitive categories identified in the input document.", + "items": { + "$ref": "ClassificationCategory" + }, + "type": "array" + }, "sentences": { "description": "Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.", "items": { @@ -898,6 +924,35 @@ "extractSyntax": { "description": "Extract syntax information.", "type": "boolean" + }, + "moderateText": { + "description": "Moderate the document for harmful and sensitive categories.", + "type": "boolean" + } + }, + "type": "object" + }, + "ModerateTextRequest": { + "description": "The document moderation request message.", + "id": "ModerateTextRequest", + "properties": { + "document": { + "$ref": "Document", + "description": "Required. Input document." + } + }, + "type": "object" + }, + "ModerateTextResponse": { + "description": "The document moderation response message.", + "id": "ModerateTextResponse", + "properties": { + "moderationCategories": { + "description": "Harmful and sensitive categories representing the input document.", + "items": { + "$ref": "ClassificationCategory" + }, + "type": "array" } }, "type": "object" diff --git a/language/v1/language-gen.go b/language/v1/language-gen.go index b2b76ec2068..7b7ca13eda5 100644 --- a/language/v1/language-gen.go +++ b/language/v1/language-gen.go @@ -568,6 +568,10 @@ type AnnotateTextResponse struct { // details. Language string `json:"language,omitempty"` + // ModerationCategories: Harmful and sensitive categories identified in + // the input document. + ModerationCategories []*ClassificationCategory `json:"moderationCategories,omitempty"` + // Sentences: Sentences in the input document. Populated if the user // enables AnnotateTextRequest.Features.extract_syntax. Sentences []*Sentence `json:"sentences,omitempty"` @@ -1103,6 +1107,10 @@ type Features struct { // ExtractSyntax: Extract syntax information. ExtractSyntax bool `json:"extractSyntax,omitempty"` + // ModerateText: Moderate the document for harmful and sensitive + // categories. + ModerateText bool `json:"moderateText,omitempty"` + // ForceSendFields is a list of field names (e.g. // "ClassificationModelOptions") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -1128,6 +1136,69 @@ func (s *Features) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ModerateTextRequest: The document moderation request message. +type ModerateTextRequest struct { + // Document: Required. Input document. + Document *Document `json:"document,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Document") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModerateTextRequest) MarshalJSON() ([]byte, error) { + type NoMethod ModerateTextRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModerateTextResponse: The document moderation response message. +type ModerateTextResponse struct { + // ModerationCategories: Harmful and sensitive categories representing + // the input document. + ModerationCategories []*ClassificationCategory `json:"moderationCategories,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "ModerationCategories") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ModerationCategories") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ModerateTextResponse) MarshalJSON() ([]byte, error) { + type NoMethod ModerateTextResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PartOfSpeech: Represents part of speech information for a token. // Parts of speech are as defined in // http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf @@ -2313,3 +2384,130 @@ func (c *DocumentsClassifyTextCall) Do(opts ...googleapi.CallOption) (*ClassifyT // } } + +// method id "language.documents.moderateText": + +type DocumentsModerateTextCall struct { + s *Service + moderatetextrequest *ModerateTextRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ModerateText: Moderates a document for harmful and sensitive +// categories. +func (r *DocumentsService) ModerateText(moderatetextrequest *ModerateTextRequest) *DocumentsModerateTextCall { + c := &DocumentsModerateTextCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.moderatetextrequest = moderatetextrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DocumentsModerateTextCall) Fields(s ...googleapi.Field) *DocumentsModerateTextCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DocumentsModerateTextCall) Context(ctx context.Context) *DocumentsModerateTextCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DocumentsModerateTextCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DocumentsModerateTextCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.moderatetextrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents:moderateText") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "language.documents.moderateText" call. +// Exactly one of *ModerateTextResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ModerateTextResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DocumentsModerateTextCall) Do(opts ...googleapi.CallOption) (*ModerateTextResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ModerateTextResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Moderates a document for harmful and sensitive categories.", + // "flatPath": "v1/documents:moderateText", + // "httpMethod": "POST", + // "id": "language.documents.moderateText", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/documents:moderateText", + // "request": { + // "$ref": "ModerateTextRequest" + // }, + // "response": { + // "$ref": "ModerateTextResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-language", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/language/v1beta2/language-api.json b/language/v1beta2/language-api.json index 9aca9de4814..d6de5c670fe 100644 --- a/language/v1beta2/language-api.json +++ b/language/v1beta2/language-api.json @@ -223,11 +223,30 @@ "https://www.googleapis.com/auth/cloud-language", "https://www.googleapis.com/auth/cloud-platform" ] + }, + "moderateText": { + "description": "Moderates a document for harmful and sensitive categories.", + "flatPath": "v1beta2/documents:moderateText", + "httpMethod": "POST", + "id": "language.documents.moderateText", + "parameterOrder": [], + "parameters": {}, + "path": "v1beta2/documents:moderateText", + "request": { + "$ref": "ModerateTextRequest" + }, + "response": { + "$ref": "ModerateTextResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-language", + "https://www.googleapis.com/auth/cloud-platform" + ] } } } }, - "revision": "20230424", + "revision": "20230527", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -478,6 +497,13 @@ "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.", "type": "string" }, + "moderationCategories": { + "description": "Harmful and sensitive categories identified in the input document.", + "items": { + "$ref": "ClassificationCategory" + }, + "type": "array" + }, "sentences": { "description": "Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.", "items": { @@ -916,6 +942,35 @@ "extractSyntax": { "description": "Extract syntax information.", "type": "boolean" + }, + "moderateText": { + "description": "Moderate the document for harmful and sensitive categories.", + "type": "boolean" + } + }, + "type": "object" + }, + "ModerateTextRequest": { + "description": "The document moderation request message.", + "id": "ModerateTextRequest", + "properties": { + "document": { + "$ref": "Document", + "description": "Required. Input document." + } + }, + "type": "object" + }, + "ModerateTextResponse": { + "description": "The document moderation response message.", + "id": "ModerateTextResponse", + "properties": { + "moderationCategories": { + "description": "Harmful and sensitive categories representing the input document.", + "items": { + "$ref": "ClassificationCategory" + }, + "type": "array" } }, "type": "object" diff --git a/language/v1beta2/language-gen.go b/language/v1beta2/language-gen.go index f45f4c0bafa..879c0e086f4 100644 --- a/language/v1beta2/language-gen.go +++ b/language/v1beta2/language-gen.go @@ -568,6 +568,10 @@ type AnnotateTextResponse struct { // details. Language string `json:"language,omitempty"` + // ModerationCategories: Harmful and sensitive categories identified in + // the input document. + ModerationCategories []*ClassificationCategory `json:"moderationCategories,omitempty"` + // Sentences: Sentences in the input document. Populated if the user // enables AnnotateTextRequest.Features.extract_syntax. Sentences []*Sentence `json:"sentences,omitempty"` @@ -1124,6 +1128,10 @@ type Features struct { // ExtractSyntax: Extract syntax information. ExtractSyntax bool `json:"extractSyntax,omitempty"` + // ModerateText: Moderate the document for harmful and sensitive + // categories. + ModerateText bool `json:"moderateText,omitempty"` + // ForceSendFields is a list of field names (e.g. // "ClassificationModelOptions") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -1149,6 +1157,69 @@ func (s *Features) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ModerateTextRequest: The document moderation request message. +type ModerateTextRequest struct { + // Document: Required. Input document. + Document *Document `json:"document,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Document") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModerateTextRequest) MarshalJSON() ([]byte, error) { + type NoMethod ModerateTextRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModerateTextResponse: The document moderation response message. +type ModerateTextResponse struct { + // ModerationCategories: Harmful and sensitive categories representing + // the input document. + ModerationCategories []*ClassificationCategory `json:"moderationCategories,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "ModerationCategories") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ModerationCategories") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ModerateTextResponse) MarshalJSON() ([]byte, error) { + type NoMethod ModerateTextResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PartOfSpeech: Represents part of speech information for a token. type PartOfSpeech struct { // Aspect: The grammatical aspect. @@ -2331,3 +2402,130 @@ func (c *DocumentsClassifyTextCall) Do(opts ...googleapi.CallOption) (*ClassifyT // } } + +// method id "language.documents.moderateText": + +type DocumentsModerateTextCall struct { + s *Service + moderatetextrequest *ModerateTextRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ModerateText: Moderates a document for harmful and sensitive +// categories. +func (r *DocumentsService) ModerateText(moderatetextrequest *ModerateTextRequest) *DocumentsModerateTextCall { + c := &DocumentsModerateTextCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.moderatetextrequest = moderatetextrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DocumentsModerateTextCall) Fields(s ...googleapi.Field) *DocumentsModerateTextCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DocumentsModerateTextCall) Context(ctx context.Context) *DocumentsModerateTextCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DocumentsModerateTextCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DocumentsModerateTextCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.moderatetextrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/documents:moderateText") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "language.documents.moderateText" call. +// Exactly one of *ModerateTextResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ModerateTextResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DocumentsModerateTextCall) Do(opts ...googleapi.CallOption) (*ModerateTextResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ModerateTextResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Moderates a document for harmful and sensitive categories.", + // "flatPath": "v1beta2/documents:moderateText", + // "httpMethod": "POST", + // "id": "language.documents.moderateText", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1beta2/documents:moderateText", + // "request": { + // "$ref": "ModerateTextRequest" + // }, + // "response": { + // "$ref": "ModerateTextResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-language", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json index 51578b585a9..2e3a3525be6 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json @@ -414,56 +414,6 @@ }, "locations": { "methods": { - "associate": { - "description": "Associates a location to a place ID. Any previous association is overwritten. This operation is only valid if the location is unverified. The association must be valid, that is, it appears in the list of `SearchGoogleLocations`.", - "flatPath": "v1/locations/{locationsId}:associate", - "httpMethod": "POST", - "id": "mybusinessbusinessinformation.locations.associate", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the location to associate.", - "location": "path", - "pattern": "^locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:associate", - "request": { - "$ref": "AssociateLocationRequest" - }, - "response": { - "$ref": "Empty" - } - }, - "clearLocationAssociation": { - "description": "Clears an association between a location and its place ID. This operation is only valid if the location is unverified.", - "flatPath": "v1/locations/{locationsId}:clearLocationAssociation", - "httpMethod": "POST", - "id": "mybusinessbusinessinformation.locations.clearLocationAssociation", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the location to disassociate.", - "location": "path", - "pattern": "^locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:clearLocationAssociation", - "request": { - "$ref": "ClearLocationAssociationRequest" - }, - "response": { - "$ref": "Empty" - } - }, "delete": { "description": "Deletes a location. If this location cannot be deleted using the API and it is marked so in the `google.mybusiness.businessinformation.v1.LocationState`, use the [Google Business Profile](https://business.google.com/manage/) website.", "flatPath": "v1/locations/{locationsId}", @@ -662,7 +612,7 @@ } } }, - "revision": "20221201", + "revision": "20230531", "rootUrl": "https://mybusinessbusinessinformation.googleapis.com/", "schemas": { "AdWordsLocationExtensions": { @@ -676,17 +626,6 @@ }, "type": "object" }, - "AssociateLocationRequest": { - "description": "Request message for Locations.AssociateLocationRequest.", - "id": "AssociateLocationRequest", - "properties": { - "placeId": { - "description": "The association to establish. If not set, it indicates no match.", - "type": "string" - } - }, - "type": "object" - }, "Attribute": { "description": "A location attribute. Attributes provide additional information about a location. The attributes that can be set on a location may vary based on the properties of that location (for example, category). Available attributes are determined by Google and may be added and removed without API changes.", "id": "Attribute", @@ -954,12 +893,6 @@ }, "type": "object" }, - "ClearLocationAssociationRequest": { - "description": "Request message for Locations.ClearLocationAssociationRequest.", - "id": "ClearLocationAssociationRequest", - "properties": {}, - "type": "object" - }, "Date": { "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", "id": "Date", diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go index f10ee14eddb..7e6505ddf24 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go @@ -249,36 +249,6 @@ func (s *AdWordsLocationExtensions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AssociateLocationRequest: Request message for -// Locations.AssociateLocationRequest. -type AssociateLocationRequest struct { - // PlaceId: The association to establish. If not set, it indicates no - // match. - PlaceId string `json:"placeId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PlaceId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PlaceId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AssociateLocationRequest) MarshalJSON() ([]byte, error) { - type NoMethod AssociateLocationRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Attribute: A location attribute. Attributes provide additional // information about a location. The attributes that can be set on a // location may vary based on the properties of that location (for @@ -737,11 +707,6 @@ func (s *ChainUri) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ClearLocationAssociationRequest: Request message for -// Locations.ClearLocationAssociationRequest. -type ClearLocationAssociationRequest struct { -} - // Date: Represents a whole or partial calendar date, such as a // birthday. The time of day and time zone are either specified // elsewhere or are insignificant. The date is relative to the Gregorian @@ -3931,289 +3896,6 @@ func (c *GoogleLocationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchGoo } -// method id "mybusinessbusinessinformation.locations.associate": - -type LocationsAssociateCall struct { - s *Service - name string - associatelocationrequest *AssociateLocationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Associate: Associates a location to a place ID. Any previous -// association is overwritten. This operation is only valid if the -// location is unverified. The association must be valid, that is, it -// appears in the list of `SearchGoogleLocations`. -// -// - name: The resource name of the location to associate. -func (r *LocationsService) Associate(name string, associatelocationrequest *AssociateLocationRequest) *LocationsAssociateCall { - c := &LocationsAssociateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.associatelocationrequest = associatelocationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LocationsAssociateCall) Fields(s ...googleapi.Field) *LocationsAssociateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LocationsAssociateCall) Context(ctx context.Context) *LocationsAssociateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LocationsAssociateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsAssociateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.associatelocationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:associate") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "mybusinessbusinessinformation.locations.associate" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *LocationsAssociateCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Associates a location to a place ID. Any previous association is overwritten. This operation is only valid if the location is unverified. The association must be valid, that is, it appears in the list of `SearchGoogleLocations`.", - // "flatPath": "v1/locations/{locationsId}:associate", - // "httpMethod": "POST", - // "id": "mybusinessbusinessinformation.locations.associate", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the location to associate.", - // "location": "path", - // "pattern": "^locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:associate", - // "request": { - // "$ref": "AssociateLocationRequest" - // }, - // "response": { - // "$ref": "Empty" - // } - // } - -} - -// method id "mybusinessbusinessinformation.locations.clearLocationAssociation": - -type LocationsClearLocationAssociationCall struct { - s *Service - name string - clearlocationassociationrequest *ClearLocationAssociationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ClearLocationAssociation: Clears an association between a location -// and its place ID. This operation is only valid if the location is -// unverified. -// -// - name: The resource name of the location to disassociate. -func (r *LocationsService) ClearLocationAssociation(name string, clearlocationassociationrequest *ClearLocationAssociationRequest) *LocationsClearLocationAssociationCall { - c := &LocationsClearLocationAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.clearlocationassociationrequest = clearlocationassociationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LocationsClearLocationAssociationCall) Fields(s ...googleapi.Field) *LocationsClearLocationAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LocationsClearLocationAssociationCall) Context(ctx context.Context) *LocationsClearLocationAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LocationsClearLocationAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LocationsClearLocationAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearlocationassociationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:clearLocationAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "mybusinessbusinessinformation.locations.clearLocationAssociation" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *LocationsClearLocationAssociationCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Clears an association between a location and its place ID. This operation is only valid if the location is unverified.", - // "flatPath": "v1/locations/{locationsId}:clearLocationAssociation", - // "httpMethod": "POST", - // "id": "mybusinessbusinessinformation.locations.clearLocationAssociation", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the location to disassociate.", - // "location": "path", - // "pattern": "^locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:clearLocationAssociation", - // "request": { - // "$ref": "ClearLocationAssociationRequest" - // }, - // "response": { - // "$ref": "Empty" - // } - // } - -} - // method id "mybusinessbusinessinformation.locations.delete": type LocationsDeleteCall struct { diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index ad2bd557db2..24d206370d7 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -666,7 +666,7 @@ } } }, - "revision": "20230514", + "revision": "20230528", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -860,7 +860,7 @@ "type": "string" }, "privateKey": { - "description": "Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account.", + "description": "Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.", "type": "string" }, "teamId": { @@ -1226,7 +1226,7 @@ }, "appleDeveloperId": { "$ref": "GoogleCloudRecaptchaenterpriseV1AppleDeveloperId", - "description": "Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform specific checks like Apple AppAttest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA Enterprise to get a better assessment of the integrity of your app." + "description": "Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA Enterprise to get a better assessment of the integrity of your app." } }, "type": "object" diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index d4903c5d3df..85f833aebaa 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -491,7 +491,8 @@ type GoogleCloudRecaptchaenterpriseV1AppleDeveloperId struct { // PrivateKey: Required. Input only. A private key (downloaded as a text // file with a .p8 file extension) generated for your Apple Developer - // account. + // account. Ensure that Apple DeviceCheck is enabled for the private + // key. PrivateKey string `json:"privateKey,omitempty"` // TeamId: Required. The Apple team ID (10-character string) owning the @@ -1194,7 +1195,7 @@ type GoogleCloudRecaptchaenterpriseV1IOSKeySettings struct { // AppleDeveloperId: Apple Developer account details for the app that is // protected by the reCAPTCHA Key. reCAPTCHA Enterprise leverages - // platform specific checks like Apple AppAttest and Apple DeviceCheck + // platform-specific checks like Apple App Attest and Apple DeviceCheck // to protect your app from abuse. Providing these fields allows // reCAPTCHA Enterprise to get a better assessment of the integrity of // your app. diff --git a/run/v1/run-api.json b/run/v1/run-api.json index c881b2378d7..2cfcbcc4b53 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2289,7 +2289,7 @@ } } }, - "revision": "20230521", + "revision": "20230528", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -2351,7 +2351,7 @@ "type": "object" }, "AuthorizedDomain": { - "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via [Webmaster Central](https://www.google.com/webmasters/verification/home).", + "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via [Search Console](https://search.google.com/search-console/welcome).", "id": "AuthorizedDomain", "properties": { "id": { diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index 0d385749380..5e1c1c539cc 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -500,9 +500,8 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { } // AuthorizedDomain: A domain that a user has been authorized to -// administer. To authorize use of a domain, verify ownership via -// Webmaster Central -// (https://www.google.com/webmasters/verification/home). +// administer. To authorize use of a domain, verify ownership via Search +// Console (https://search.google.com/search-console/welcome). type AuthorizedDomain struct { // Id: Relative name of the domain authorized for use. Example: // `example.com`. diff --git a/run/v2/run-api.json b/run/v2/run-api.json index 2501308c87f..1737ff3aea2 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1087,7 +1087,7 @@ } } }, - "revision": "20230430", + "revision": "20230528", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -1264,7 +1264,7 @@ "type": "object" }, "GoogleCloudRunV2Container": { - "description": "A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments may be supplied by the system to the container at runtime.", + "description": "A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments can be supplied by the system to the container at runtime.", "id": "GoogleCloudRunV2Container", "properties": { "args": { @@ -1380,7 +1380,7 @@ "id": "GoogleCloudRunV2EnvVar", "properties": { "name": { - "description": "Required. Name of the environment variable. Must be a C_IDENTIFIER, and mnay not exceed 32768 characters.", + "description": "Required. Name of the environment variable. Must be a C_IDENTIFIER, and must not exceed 32768 characters.", "type": "string" }, "value": { diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 1e0eb2e7b97..10b03567140 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -444,7 +444,7 @@ func (s *GoogleCloudRunV2Condition) MarshalJSON() ([]byte, error) { // GoogleCloudRunV2Container: A single application container. This // specifies both the container to run, the command to run in the // container and the arguments to supply to it. Note that additional -// arguments may be supplied by the system to the container at runtime. +// arguments can be supplied by the system to the container at runtime. type GoogleCloudRunV2Container struct { // Args: Arguments to the entrypoint. The docker image's CMD is used if // this is not provided. @@ -608,7 +608,7 @@ func (s *GoogleCloudRunV2EmptyDirVolumeSource) MarshalJSON() ([]byte, error) { // present in a Container. type GoogleCloudRunV2EnvVar struct { // Name: Required. Name of the environment variable. Must be a - // C_IDENTIFIER, and mnay not exceed 32768 characters. + // C_IDENTIFIER, and must not exceed 32768 characters. Name string `json:"name,omitempty"` // Value: Variable references $(VAR_NAME) are expanded using the diff --git a/streetviewpublish/v1/streetviewpublish-api.json b/streetviewpublish/v1/streetviewpublish-api.json index 7c1880a1443..cf4f9e80ede 100644 --- a/streetviewpublish/v1/streetviewpublish-api.json +++ b/streetviewpublish/v1/streetviewpublish-api.json @@ -534,7 +534,7 @@ } } }, - "revision": "20230522", + "revision": "20230530", "rootUrl": "https://streetviewpublish.googleapis.com/", "schemas": { "BatchDeletePhotosRequest": { @@ -1155,6 +1155,11 @@ "description": "Output only. A rectangular box that encapsulates every image in this photo sequence.", "readOnly": true }, + "takedown": { + "description": "Output only. Set if a Photo within the PhotoSequence contains a takedown.", + "readOnly": true, + "type": "boolean" + }, "uploadReference": { "$ref": "UploadRef", "description": "Input only. Required when creating photo sequence. The resource name where the bytes of the photo sequence (in the form of video) are uploaded." diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go index 4848f6f257e..83cfcbadfbd 100644 --- a/streetviewpublish/v1/streetviewpublish-gen.go +++ b/streetviewpublish/v1/streetviewpublish-gen.go @@ -1200,6 +1200,10 @@ type PhotoSequence struct { // every image in this photo sequence. SequenceBounds *LatLngBounds `json:"sequenceBounds,omitempty"` + // Takedown: Output only. Set if a Photo within the PhotoSequence + // contains a takedown. + Takedown bool `json:"takedown,omitempty"` + // UploadReference: Input only. Required when creating photo sequence. // The resource name where the bytes of the photo sequence (in the form // of video) are uploaded.