diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 1885af13529..5834db6b0c3 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -305,50 +305,6 @@ }, "protocol": "rest", "resources": { - "media": { - "methods": { - "upload": { - "description": "Upload a file into a RagCorpus.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles:upload", - "httpMethod": "POST", - "id": "aiplatform.media.upload", - "mediaUpload": { - "accept": [ - "*/*" - ], - "protocols": { - "simple": { - "multipart": true, - "path": "/upload/v1beta1/{+parent}/ragFiles:upload" - } - } - }, - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the RagCorpus resource into which to upload the file. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/ragFiles:upload", - "request": { - "$ref": "GoogleCloudAiplatformV1beta1UploadRagFileRequest" - }, - "response": { - "$ref": "GoogleCloudAiplatformV1beta1UploadRagFileResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "supportsMediaUpload": true - } - } - }, "projects": { "methods": { "getCacheConfig": { @@ -501,34 +457,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "retrieveContexts": { - "description": "Retrieves relevant contexts for a query.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:retrieveContexts", - "httpMethod": "POST", - "id": "aiplatform.projects.locations.retrieveContexts", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}:retrieveContexts", - "request": { - "$ref": "GoogleCloudAiplatformV1beta1RetrieveContextsRequest" - }, - "response": { - "$ref": "GoogleCloudAiplatformV1beta1RetrieveContextsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } }, "resources": { @@ -14426,127 +14354,6 @@ } }, "ragCorpora": { - "methods": { - "create": { - "description": "Creates a RagCorpus.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora", - "httpMethod": "POST", - "id": "aiplatform.projects.locations.ragCorpora.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The resource name of the Location to create the RagCorpus in. Format: `projects/{project}/locations/{location}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/ragCorpora", - "request": { - "$ref": "GoogleCloudAiplatformV1beta1RagCorpus" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a RagCorpus.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}", - "httpMethod": "DELETE", - "id": "aiplatform.projects.locations.ragCorpora.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "force": { - "description": "Optional. If set to true, any RagFiles in this RagCorpus will also be deleted. Otherwise, the request will only work if the RagCorpus has no RagFiles.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "Required. The name of the RagCorpus resource to be deleted. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets a RagCorpus.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}", - "httpMethod": "GET", - "id": "aiplatform.projects.locations.ragCorpora.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the RagCorpus resource. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "GoogleCloudAiplatformV1beta1RagCorpus" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists RagCorpora in a Location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora", - "httpMethod": "GET", - "id": "aiplatform.projects.locations.ragCorpora.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The standard list page token. Typically obtained via ListRagCorporaResponse.next_page_token of the previous VertexRagDataService.ListRagCorpora call.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The resource name of the Location from which to list the RagCorpora. Format: `projects/{project}/locations/{location}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/ragCorpora", - "response": { - "$ref": "GoogleCloudAiplatformV1beta1ListRagCorporaResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "operations": { "methods": { @@ -14700,122 +14507,6 @@ } }, "ragFiles": { - "methods": { - "delete": { - "description": "Deletes a RagFile.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}", - "httpMethod": "DELETE", - "id": "aiplatform.projects.locations.ragCorpora.ragFiles.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the RagFile resource to be deleted. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets a RagFile.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}", - "httpMethod": "GET", - "id": "aiplatform.projects.locations.ragCorpora.ragFiles.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the RagFile resource. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "GoogleCloudAiplatformV1beta1RagFile" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "import": { - "description": "Import files from Google Cloud Storage or Google Drive into a RagCorpus.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles:import", - "httpMethod": "POST", - "id": "aiplatform.projects.locations.ragCorpora.ragFiles.import", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the RagCorpus resource into which to import files. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/ragFiles:import", - "request": { - "$ref": "GoogleCloudAiplatformV1beta1ImportRagFilesRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists RagFiles in a RagCorpus.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles", - "httpMethod": "GET", - "id": "aiplatform.projects.locations.ragCorpora.ragFiles.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The standard list page token. Typically obtained via ListRagFilesResponse.next_page_token of the previous VertexRagDataService.ListRagFiles call.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The resource name of the RagCorpus from which to list the RagFiles. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/ragFiles", - "response": { - "$ref": "GoogleCloudAiplatformV1beta1ListRagFilesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "operations": { "methods": { @@ -18825,7 +18516,7 @@ } } }, - "revision": "20240328", + "revision": "20240404", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionEmbedVideoResponse": { @@ -23250,12 +22941,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1DirectUploadSource": { - "description": "The input content is encapsulated and uploaded in the request.", - "id": "GoogleCloudAiplatformV1beta1DirectUploadSource", - "properties": {}, - "type": "object" - }, "GoogleCloudAiplatformV1beta1DiskSpec": { "description": "Represents the spec of disk options.", "id": "GoogleCloudAiplatformV1beta1DiskSpec", @@ -26763,45 +26448,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1GoogleDriveSource": { - "description": "The Google Drive location for the input content.", - "id": "GoogleCloudAiplatformV1beta1GoogleDriveSource", - "properties": { - "resourceIds": { - "description": "Required. Google Drive resource IDs.", - "items": { - "$ref": "GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId": { - "description": "The type and ID of the Google Drive resource.", - "id": "GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId", - "properties": { - "resourceId": { - "description": "Required. The ID of the Google Drive resource.", - "type": "string" - }, - "resourceType": { - "description": "Required. The type of the Google Drive resource.", - "enum": [ - "RESOURCE_TYPE_UNSPECIFIED", - "RESOURCE_TYPE_FILE", - "RESOURCE_TYPE_FOLDER" - ], - "enumDescriptions": [ - "Unspecified resource type.", - "File resource type.", - "Folder resource type." - ], - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval": { "description": "Tool to retrieve public web data for grounding, powered by Google.", "id": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", @@ -27320,36 +26966,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1ImportRagFilesConfig": { - "description": "Config for importing RagFiles.", - "id": "GoogleCloudAiplatformV1beta1ImportRagFilesConfig", - "properties": { - "gcsSource": { - "$ref": "GoogleCloudAiplatformV1beta1GcsSource", - "description": "Google Cloud Storage location. Supports importing individual files as well as entire Google Cloud Storage directories. Sample formats: * \"gs://bucket_name/my_directory/object_name/my_file.txt\". * \"gs://bucket_name/my_directory\"" - }, - "googleDriveSource": { - "$ref": "GoogleCloudAiplatformV1beta1GoogleDriveSource", - "description": "Google Drive location. Supports importing individual files as well as Google Drive folders." - }, - "ragFileChunkingConfig": { - "$ref": "GoogleCloudAiplatformV1beta1RagFileChunkingConfig", - "description": "Specifies the size and overlap of chunks after importing RagFiles." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1ImportRagFilesRequest": { - "description": "Request message for VertexRagDataService.ImportRagFiles.", - "id": "GoogleCloudAiplatformV1beta1ImportRagFilesRequest", - "properties": { - "importRagFilesConfig": { - "$ref": "GoogleCloudAiplatformV1beta1ImportRagFilesConfig", - "description": "Required. The config for the RagFiles to be synced and imported into the RagCorpus. VertexRagDataService.ImportRagFiles." - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1Index": { "description": "A representation of a collection of database items organized in a way that allows for approximate nearest neighbor (a.k.a ANN) algorithms search.", "id": "GoogleCloudAiplatformV1beta1Index", @@ -28537,42 +28153,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1ListRagCorporaResponse": { - "description": "Response message for VertexRagDataService.ListRagCorpora.", - "id": "GoogleCloudAiplatformV1beta1ListRagCorporaResponse", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results. Pass to ListRagCorporaRequest.page_token to obtain that page.", - "type": "string" - }, - "ragCorpora": { - "description": "List of RagCorpora in the requested page.", - "items": { - "$ref": "GoogleCloudAiplatformV1beta1RagCorpus" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1ListRagFilesResponse": { - "description": "Response message for VertexRagDataService.ListRagFiles.", - "id": "GoogleCloudAiplatformV1beta1ListRagFilesResponse", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results. Pass to ListRagFilesRequest.page_token to obtain that page.", - "type": "string" - }, - "ragFiles": { - "description": "List of RagFiles in the requested page.", - "items": { - "$ref": "GoogleCloudAiplatformV1beta1RagFile" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse": { "description": "Response message for ReasoningEngineService.ListReasoningEngines", "id": "GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse", @@ -33347,173 +32927,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1RagContexts": { - "description": "Relevant contexts for one query.", - "id": "GoogleCloudAiplatformV1beta1RagContexts", - "properties": { - "contexts": { - "description": "All its contexts.", - "items": { - "$ref": "GoogleCloudAiplatformV1beta1RagContextsContext" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RagContextsContext": { - "description": "A context of the query.", - "id": "GoogleCloudAiplatformV1beta1RagContextsContext", - "properties": { - "distance": { - "description": "The distance between the query vector and the context text vector.", - "format": "double", - "type": "number" - }, - "sourceUri": { - "description": "For vertex RagStore, if the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name.", - "type": "string" - }, - "text": { - "description": "The text chunk.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RagCorpus": { - "description": "A RagCorpus is a RagFile container and a project can have multiple RagCorpora.", - "id": "GoogleCloudAiplatformV1beta1RagCorpus", - "properties": { - "createTime": { - "description": "Output only. Timestamp when this RagCorpus was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. The description of the RagCorpus.", - "type": "string" - }, - "displayName": { - "description": "Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.", - "type": "string" - }, - "name": { - "description": "Output only. The resource name of the RagCorpus.", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. Timestamp when this RagCorpus was last updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RagFile": { - "description": "A RagFile contains user data for chunking, embedding and indexing.", - "id": "GoogleCloudAiplatformV1beta1RagFile", - "properties": { - "createTime": { - "description": "Output only. Timestamp when this RagFile was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. The description of the RagFile.", - "type": "string" - }, - "directUploadSource": { - "$ref": "GoogleCloudAiplatformV1beta1DirectUploadSource", - "description": "Output only. The RagFile is encapsulated and uploaded in the UploadRagFile request.", - "readOnly": true - }, - "displayName": { - "description": "Required. The display name of the RagFile. The name can be up to 128 characters long and can consist of any UTF-8 characters.", - "type": "string" - }, - "gcsSource": { - "$ref": "GoogleCloudAiplatformV1beta1GcsSource", - "description": "Output only. Google Cloud Storage location of the RagFile. It does not support wildcards in the GCS uri for now.", - "readOnly": true - }, - "googleDriveSource": { - "$ref": "GoogleCloudAiplatformV1beta1GoogleDriveSource", - "description": "Output only. Google Drive location. Supports importing individual files as well as Google Drive folders.", - "readOnly": true - }, - "name": { - "description": "Output only. The resource name of the RagFile.", - "readOnly": true, - "type": "string" - }, - "ragFileType": { - "description": "Output only. The type of the RagFile.", - "enum": [ - "RAG_FILE_TYPE_UNSPECIFIED", - "RAG_FILE_TYPE_TXT", - "RAG_FILE_TYPE_PDF" - ], - "enumDescriptions": [ - "RagFile type is unspecified.", - "RagFile type is TXT.", - "RagFile type is PDF." - ], - "readOnly": true, - "type": "string" - }, - "sizeBytes": { - "description": "Output only. The size of the RagFile in bytes.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. Timestamp when this RagFile was last updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RagFileChunkingConfig": { - "description": "Specifies the size and overlap of chunks for RagFiles.", - "id": "GoogleCloudAiplatformV1beta1RagFileChunkingConfig", - "properties": { - "chunkOverlap": { - "description": "The overlap between chunks.", - "format": "int32", - "type": "integer" - }, - "chunkSize": { - "description": "The size of the chunks.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RagQuery": { - "description": "A query to retrieve relevant contexts.", - "id": "GoogleCloudAiplatformV1beta1RagQuery", - "properties": { - "similarityTopK": { - "description": "Optional. The number of contexts to retrieve.", - "format": "int32", - "type": "integer" - }, - "text": { - "description": "Optional. The query in text format to get relevant contexts.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1RawPredictRequest": { "description": "Request message for PredictionService.RawPredict.", "id": "GoogleCloudAiplatformV1beta1RawPredictRequest", @@ -34153,46 +33566,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1RetrieveContextsRequest": { - "description": "Request message for VertexRagService.RetrieveContexts.", - "id": "GoogleCloudAiplatformV1beta1RetrieveContextsRequest", - "properties": { - "query": { - "$ref": "GoogleCloudAiplatformV1beta1RagQuery", - "description": "Required. Single RAG retrieve query." - }, - "vertexRagStore": { - "$ref": "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore", - "description": "The data source for Vertex RagStore." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore": { - "description": "The data source for Vertex RagStore.", - "id": "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore", - "properties": { - "ragCorpora": { - "description": "Required. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` Currently only one corpus is allowed. In the future we may open up multiple corpora support. However, they should be from the same project and location.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RetrieveContextsResponse": { - "description": "Response message for VertexRagService.RetrieveContexts.", - "id": "GoogleCloudAiplatformV1beta1RetrieveContextsResponse", - "properties": { - "contexts": { - "$ref": "GoogleCloudAiplatformV1beta1RagContexts", - "description": "The contexts of the query." - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1RougeInput": { "description": "Input for rouge metric.", "id": "GoogleCloudAiplatformV1beta1RougeInput", @@ -41415,47 +40788,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1UploadRagFileConfig": { - "description": "Config for uploading RagFile.", - "id": "GoogleCloudAiplatformV1beta1UploadRagFileConfig", - "properties": { - "ragFileChunkingConfig": { - "$ref": "GoogleCloudAiplatformV1beta1RagFileChunkingConfig", - "description": "Specifies the size and overlap of chunks after uploading RagFile." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1UploadRagFileRequest": { - "description": "Request message for VertexRagDataService.UploadRagFile.", - "id": "GoogleCloudAiplatformV1beta1UploadRagFileRequest", - "properties": { - "ragFile": { - "$ref": "GoogleCloudAiplatformV1beta1RagFile", - "description": "Required. The RagFile to upload." - }, - "uploadRagFileConfig": { - "$ref": "GoogleCloudAiplatformV1beta1UploadRagFileConfig", - "description": "Required. The config for the RagFiles to be uploaded into the RagCorpus. VertexRagDataService.UploadRagFile." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1UploadRagFileResponse": { - "description": "Response message for VertexRagDataService.UploadRagFile.", - "id": "GoogleCloudAiplatformV1beta1UploadRagFileResponse", - "properties": { - "error": { - "$ref": "GoogleRpcStatus", - "description": "The error that occurred while processing the RagFile." - }, - "ragFile": { - "$ref": "GoogleCloudAiplatformV1beta1RagFile", - "description": "The RagFile that had been uploaded into the RagCorpus." - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1UpsertDatapointsRequest": { "description": "Request message for IndexService.UpsertDatapoints", "id": "GoogleCloudAiplatformV1beta1UpsertDatapointsRequest", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 0f56c4c7705..733370f497a 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -146,7 +146,6 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} - s.Media = NewMediaService(s) s.Projects = NewProjectsService(s) s.Publishers = NewPublishersService(s) return s, nil @@ -157,8 +156,6 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment - Media *MediaService - Projects *ProjectsService Publishers *PublishersService @@ -171,15 +168,6 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } -func NewMediaService(s *Service) *MediaService { - rs := &MediaService{s: s} - return rs -} - -type MediaService struct { - s *Service -} - func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -9598,11 +9586,6 @@ func (s *GoogleCloudAiplatformV1beta1DirectRawPredictResponse) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1DirectUploadSource: The input content is -// encapsulated and uploaded in the request. -type GoogleCloudAiplatformV1beta1DirectUploadSource struct { -} - // GoogleCloudAiplatformV1beta1DiskSpec: Represents the spec of disk // options. type GoogleCloudAiplatformV1beta1DiskSpec struct { @@ -16038,72 +16021,6 @@ func (s *GoogleCloudAiplatformV1beta1GenieSource) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1GoogleDriveSource: The Google Drive -// location for the input content. -type GoogleCloudAiplatformV1beta1GoogleDriveSource struct { - // ResourceIds: Required. Google Drive resource IDs. - ResourceIds []*GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId `json:"resourceIds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ResourceIds") 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. "ResourceIds") 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 *GoogleCloudAiplatformV1beta1GoogleDriveSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1GoogleDriveSource - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId: The type and -// ID of the Google Drive resource. -type GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId struct { - // ResourceId: Required. The ID of the Google Drive resource. - ResourceId string `json:"resourceId,omitempty"` - - // ResourceType: Required. The type of the Google Drive resource. - // - // Possible values: - // "RESOURCE_TYPE_UNSPECIFIED" - Unspecified resource type. - // "RESOURCE_TYPE_FILE" - File resource type. - // "RESOURCE_TYPE_FOLDER" - Folder resource type. - ResourceType string `json:"resourceType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ResourceId") 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. "ResourceId") 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 *GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1GoogleSearchRetrieval: Tool to retrieve // public web data for grounding, powered by Google. type GoogleCloudAiplatformV1beta1GoogleSearchRetrieval struct { @@ -16983,80 +16900,6 @@ func (s *GoogleCloudAiplatformV1beta1ImportModelEvaluationRequest) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1ImportRagFilesConfig: Config for -// importing RagFiles. -type GoogleCloudAiplatformV1beta1ImportRagFilesConfig struct { - // GcsSource: Google Cloud Storage location. Supports importing - // individual files as well as entire Google Cloud Storage directories. - // Sample formats: * - // "gs://bucket_name/my_directory/object_name/my_file.txt". * - // "gs://bucket_name/my_directory" - GcsSource *GoogleCloudAiplatformV1beta1GcsSource `json:"gcsSource,omitempty"` - - // GoogleDriveSource: Google Drive location. Supports importing - // individual files as well as Google Drive folders. - GoogleDriveSource *GoogleCloudAiplatformV1beta1GoogleDriveSource `json:"googleDriveSource,omitempty"` - - // RagFileChunkingConfig: Specifies the size and overlap of chunks after - // importing RagFiles. - RagFileChunkingConfig *GoogleCloudAiplatformV1beta1RagFileChunkingConfig `json:"ragFileChunkingConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GcsSource") 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. "GcsSource") 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 *GoogleCloudAiplatformV1beta1ImportRagFilesConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ImportRagFilesConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1ImportRagFilesRequest: Request message -// for VertexRagDataService.ImportRagFiles. -type GoogleCloudAiplatformV1beta1ImportRagFilesRequest struct { - // ImportRagFilesConfig: Required. The config for the RagFiles to be - // synced and imported into the RagCorpus. - // VertexRagDataService.ImportRagFiles. - ImportRagFilesConfig *GoogleCloudAiplatformV1beta1ImportRagFilesConfig `json:"importRagFilesConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ImportRagFilesConfig") 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. "ImportRagFilesConfig") 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 *GoogleCloudAiplatformV1beta1ImportRagFilesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ImportRagFilesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1Index: A representation of a collection // of database items organized in a way that allows for approximate // nearest neighbor (a.k.a ANN) algorithms search. @@ -19331,80 +19174,6 @@ func (s *GoogleCloudAiplatformV1beta1ListPublisherModelsResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1ListRagCorporaResponse: Response message -// for VertexRagDataService.ListRagCorpora. -type GoogleCloudAiplatformV1beta1ListRagCorporaResponse struct { - // NextPageToken: A token to retrieve the next page of results. Pass to - // ListRagCorporaRequest.page_token to obtain that page. - NextPageToken string `json:"nextPageToken,omitempty"` - - // RagCorpora: List of RagCorpora in the requested page. - RagCorpora []*GoogleCloudAiplatformV1beta1RagCorpus `json:"ragCorpora,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *GoogleCloudAiplatformV1beta1ListRagCorporaResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ListRagCorporaResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1ListRagFilesResponse: Response message -// for VertexRagDataService.ListRagFiles. -type GoogleCloudAiplatformV1beta1ListRagFilesResponse struct { - // NextPageToken: A token to retrieve the next page of results. Pass to - // ListRagFilesRequest.page_token to obtain that page. - NextPageToken string `json:"nextPageToken,omitempty"` - - // RagFiles: List of RagFiles in the requested page. - RagFiles []*GoogleCloudAiplatformV1beta1RagFile `json:"ragFiles,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *GoogleCloudAiplatformV1beta1ListRagFilesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ListRagFilesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse: Response // message for ReasoningEngineService.ListReasoningEngines type GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse struct { @@ -27681,271 +27450,6 @@ func (s *GoogleCloudAiplatformV1beta1QuestionAnsweringRelevanceSpec) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1RagContexts: Relevant contexts for one -// query. -type GoogleCloudAiplatformV1beta1RagContexts struct { - // Contexts: All its contexts. - Contexts []*GoogleCloudAiplatformV1beta1RagContextsContext `json:"contexts,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Contexts") 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. "Contexts") 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 *GoogleCloudAiplatformV1beta1RagContexts) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagContexts - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1RagContextsContext: A context of the -// query. -type GoogleCloudAiplatformV1beta1RagContextsContext struct { - // Distance: The distance between the query vector and the context text - // vector. - Distance float64 `json:"distance,omitempty"` - - // SourceUri: For vertex RagStore, if the file is imported from Cloud - // Storage or Google Drive, source_uri will be original file URI in - // Cloud Storage or Google Drive; if file is uploaded, source_uri will - // be file display name. - SourceUri string `json:"sourceUri,omitempty"` - - // Text: The text chunk. - Text string `json:"text,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Distance") 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. "Distance") 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 *GoogleCloudAiplatformV1beta1RagContextsContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagContextsContext - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudAiplatformV1beta1RagContextsContext) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1beta1RagContextsContext - var s1 struct { - Distance gensupport.JSONFloat64 `json:"distance"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Distance = float64(s1.Distance) - return nil -} - -// GoogleCloudAiplatformV1beta1RagCorpus: A RagCorpus is a RagFile -// container and a project can have multiple RagCorpora. -type GoogleCloudAiplatformV1beta1RagCorpus struct { - // CreateTime: Output only. Timestamp when this RagCorpus was created. - CreateTime string `json:"createTime,omitempty"` - - // Description: Optional. The description of the RagCorpus. - Description string `json:"description,omitempty"` - - // DisplayName: Required. The display name of the RagCorpus. The name - // can be up to 128 characters long and can consist of any UTF-8 - // characters. - DisplayName string `json:"displayName,omitempty"` - - // Name: Output only. The resource name of the RagCorpus. - Name string `json:"name,omitempty"` - - // UpdateTime: Output only. Timestamp when this RagCorpus was last - // updated. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GoogleCloudAiplatformV1beta1RagCorpus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagCorpus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1RagFile: A RagFile contains user data for -// chunking, embedding and indexing. -type GoogleCloudAiplatformV1beta1RagFile struct { - // CreateTime: Output only. Timestamp when this RagFile was created. - CreateTime string `json:"createTime,omitempty"` - - // Description: Optional. The description of the RagFile. - Description string `json:"description,omitempty"` - - // DirectUploadSource: Output only. The RagFile is encapsulated and - // uploaded in the UploadRagFile request. - DirectUploadSource *GoogleCloudAiplatformV1beta1DirectUploadSource `json:"directUploadSource,omitempty"` - - // DisplayName: Required. The display name of the RagFile. The name can - // be up to 128 characters long and can consist of any UTF-8 characters. - DisplayName string `json:"displayName,omitempty"` - - // GcsSource: Output only. Google Cloud Storage location of the RagFile. - // It does not support wildcards in the GCS uri for now. - GcsSource *GoogleCloudAiplatformV1beta1GcsSource `json:"gcsSource,omitempty"` - - // GoogleDriveSource: Output only. Google Drive location. Supports - // importing individual files as well as Google Drive folders. - GoogleDriveSource *GoogleCloudAiplatformV1beta1GoogleDriveSource `json:"googleDriveSource,omitempty"` - - // Name: Output only. The resource name of the RagFile. - Name string `json:"name,omitempty"` - - // RagFileType: Output only. The type of the RagFile. - // - // Possible values: - // "RAG_FILE_TYPE_UNSPECIFIED" - RagFile type is unspecified. - // "RAG_FILE_TYPE_TXT" - RagFile type is TXT. - // "RAG_FILE_TYPE_PDF" - RagFile type is PDF. - RagFileType string `json:"ragFileType,omitempty"` - - // SizeBytes: Output only. The size of the RagFile in bytes. - SizeBytes int64 `json:"sizeBytes,omitempty,string"` - - // UpdateTime: Output only. Timestamp when this RagFile was last - // updated. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *GoogleCloudAiplatformV1beta1RagFile) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagFile - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1RagFileChunkingConfig: Specifies the size -// and overlap of chunks for RagFiles. -type GoogleCloudAiplatformV1beta1RagFileChunkingConfig struct { - // ChunkOverlap: The overlap between chunks. - ChunkOverlap int64 `json:"chunkOverlap,omitempty"` - - // ChunkSize: The size of the chunks. - ChunkSize int64 `json:"chunkSize,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ChunkOverlap") 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. "ChunkOverlap") 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 *GoogleCloudAiplatformV1beta1RagFileChunkingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagFileChunkingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1RagQuery: A query to retrieve relevant -// contexts. -type GoogleCloudAiplatformV1beta1RagQuery struct { - // SimilarityTopK: Optional. The number of contexts to retrieve. - SimilarityTopK int64 `json:"similarityTopK,omitempty"` - - // Text: Optional. The query in text format to get relevant contexts. - Text string `json:"text,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SimilarityTopK") 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. "SimilarityTopK") 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 *GoogleCloudAiplatformV1beta1RagQuery) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagQuery - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1RawPredictRequest: Request message for // PredictionService.RawPredict. type GoogleCloudAiplatformV1beta1RawPredictRequest struct { @@ -29245,104 +28749,6 @@ func (s *GoogleCloudAiplatformV1beta1Retrieval) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1RetrieveContextsRequest: Request message -// for VertexRagService.RetrieveContexts. -type GoogleCloudAiplatformV1beta1RetrieveContextsRequest struct { - // Query: Required. Single RAG retrieve query. - Query *GoogleCloudAiplatformV1beta1RagQuery `json:"query,omitempty"` - - // VertexRagStore: The data source for Vertex RagStore. - VertexRagStore *GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore `json:"vertexRagStore,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Query") 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. "Query") 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 *GoogleCloudAiplatformV1beta1RetrieveContextsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RetrieveContextsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore: -// The data source for Vertex RagStore. -type GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore struct { - // RagCorpora: Required. RagCorpora resource name. Format: - // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` - // Currently only one corpus is allowed. In the future we may open up - // multiple corpora support. However, they should be from the same - // project and location. - RagCorpora []string `json:"ragCorpora,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RagCorpora") 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. "RagCorpora") 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 *GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1RetrieveContextsResponse: Response -// message for VertexRagService.RetrieveContexts. -type GoogleCloudAiplatformV1beta1RetrieveContextsResponse struct { - // Contexts: The contexts of the query. - Contexts *GoogleCloudAiplatformV1beta1RagContexts `json:"contexts,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Contexts") 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. "Contexts") 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 *GoogleCloudAiplatformV1beta1RetrieveContextsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RetrieveContextsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1RougeInput: Input for rouge metric. type GoogleCloudAiplatformV1beta1RougeInput struct { // Instances: Required. Repeated rouge instances. @@ -43576,107 +42982,6 @@ func (s *GoogleCloudAiplatformV1beta1UploadModelResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1UploadRagFileConfig: Config for uploading -// RagFile. -type GoogleCloudAiplatformV1beta1UploadRagFileConfig struct { - // RagFileChunkingConfig: Specifies the size and overlap of chunks after - // uploading RagFile. - RagFileChunkingConfig *GoogleCloudAiplatformV1beta1RagFileChunkingConfig `json:"ragFileChunkingConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "RagFileChunkingConfig") 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. "RagFileChunkingConfig") 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 *GoogleCloudAiplatformV1beta1UploadRagFileConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1UploadRagFileConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1UploadRagFileRequest: Request message for -// VertexRagDataService.UploadRagFile. -type GoogleCloudAiplatformV1beta1UploadRagFileRequest struct { - // RagFile: Required. The RagFile to upload. - RagFile *GoogleCloudAiplatformV1beta1RagFile `json:"ragFile,omitempty"` - - // UploadRagFileConfig: Required. The config for the RagFiles to be - // uploaded into the RagCorpus. VertexRagDataService.UploadRagFile. - UploadRagFileConfig *GoogleCloudAiplatformV1beta1UploadRagFileConfig `json:"uploadRagFileConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RagFile") 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. "RagFile") 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 *GoogleCloudAiplatformV1beta1UploadRagFileRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1UploadRagFileRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1UploadRagFileResponse: Response message -// for VertexRagDataService.UploadRagFile. -type GoogleCloudAiplatformV1beta1UploadRagFileResponse struct { - // Error: The error that occurred while processing the RagFile. - Error *GoogleRpcStatus `json:"error,omitempty"` - - // RagFile: The RagFile that had been uploaded into the RagCorpus. - RagFile *GoogleCloudAiplatformV1beta1RagFile `json:"ragFile,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 *GoogleCloudAiplatformV1beta1UploadRagFileResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1UploadRagFileResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1UpsertDatapointsRequest: Request message // for IndexService.UpsertDatapoints type GoogleCloudAiplatformV1beta1UpsertDatapointsRequest struct { @@ -49920,232 +49225,6 @@ func (s *UtilStatusProto) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "aiplatform.media.upload": - -type MediaUploadCall struct { - s *Service - parent string - googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest - urlParams_ gensupport.URLParams - mediaInfo_ *gensupport.MediaInfo - ctx_ context.Context - header_ http.Header -} - -// Upload: Upload a file into a RagCorpus. -// -// - parent: The name of the RagCorpus resource into which to upload the -// file. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *MediaService) Upload(parent string, googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest) *MediaUploadCall { - c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1beta1uploadragfilerequest = googlecloudaiplatformv1beta1uploadragfilerequest - return c -} - -// Media specifies the media to upload in one or more chunks. The chunk -// size may be controlled by supplying a MediaOption generated by -// googleapi.ChunkSize. The chunk size defaults to -// googleapi.DefaultUploadChunkSize.The Content-Type header used in the -// upload request will be determined by sniffing the contents of r, -// unless a MediaOption generated by googleapi.ContentType is -// supplied. -// At most one of Media and ResumableMedia may be set. -func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { - c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) - return c -} - -// ResumableMedia specifies the media to upload in chunks and can be -// canceled with ctx. -// -// Deprecated: use Media instead. -// -// At most one of Media and ResumableMedia may be set. mediaType -// identifies the MIME media type of the upload, such as "image/png". If -// mediaType is "", it will be auto-detected. The provided ctx will -// supersede any context previously provided to the Context method. -func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { - c.ctx_ = ctx - c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) - return c -} - -// ProgressUpdater provides a callback function that will be called -// after every chunk. It should be a low-latency function in order to -// not slow down the upload operation. This should only be called when -// using ResumableMedia (as opposed to Media). -func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { - c.mediaInfo_.SetProgressUpdater(pu) - 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 *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { - 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. -// This context will supersede any context previously provided to the -// ResumableMedia method. -func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { - 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 *MediaUploadCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MediaUploadCall) 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.googlecloudaiplatformv1beta1uploadragfilerequest) - 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, "v1beta1/{+parent}/ragFiles:upload") - if c.mediaInfo_ != nil { - urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1beta1/{+parent}/ragFiles:upload") - c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) - } - if body == nil { - body = new(bytes.Buffer) - reqHeaders.Set("Content-Type", "application/json") - } - body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) - defer cleanup() - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - req.GetBody = getBody - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.media.upload" call. -// Exactly one of *GoogleCloudAiplatformV1beta1UploadRagFileResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudAiplatformV1beta1UploadRagFileResponse.ServerResponse.Head -// er 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 *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1UploadRagFileResponse, 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) - } - rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) - if rx != nil { - rx.Client = c.s.client - rx.UserAgent = c.s.userAgent() - ctx := c.ctx_ - if ctx == nil { - ctx = context.TODO() - } - res, err = rx.Upload(ctx) - if err != nil { - return nil, err - } - defer res.Body.Close() - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - } - ret := &GoogleCloudAiplatformV1beta1UploadRagFileResponse{ - 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": "Upload a file into a RagCorpus.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles:upload", - // "httpMethod": "POST", - // "id": "aiplatform.media.upload", - // "mediaUpload": { - // "accept": [ - // "*/*" - // ], - // "protocols": { - // "simple": { - // "multipart": true, - // "path": "/upload/v1beta1/{+parent}/ragFiles:upload" - // } - // } - // }, - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The name of the RagCorpus resource into which to upload the file. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/ragFiles:upload", - // "request": { - // "$ref": "GoogleCloudAiplatformV1beta1UploadRagFileRequest" - // }, - // "response": { - // "$ref": "GoogleCloudAiplatformV1beta1UploadRagFileResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ], - // "supportsMediaUpload": true - // } - -} - // method id "aiplatform.projects.getCacheConfig": type ProjectsGetCacheConfigCall struct { @@ -50939,152 +50018,6 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleClo } } -// method id "aiplatform.projects.locations.retrieveContexts": - -type ProjectsLocationsRetrieveContextsCall struct { - s *Service - parent string - googlecloudaiplatformv1beta1retrievecontextsrequest *GoogleCloudAiplatformV1beta1RetrieveContextsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RetrieveContexts: Retrieves relevant contexts for a query. -// -// - parent: The resource name of the Location from which to retrieve -// RagContexts. The users must have permission to make a call in the -// project. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) RetrieveContexts(parent string, googlecloudaiplatformv1beta1retrievecontextsrequest *GoogleCloudAiplatformV1beta1RetrieveContextsRequest) *ProjectsLocationsRetrieveContextsCall { - c := &ProjectsLocationsRetrieveContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1beta1retrievecontextsrequest = googlecloudaiplatformv1beta1retrievecontextsrequest - 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 *ProjectsLocationsRetrieveContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRetrieveContextsCall { - 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 *ProjectsLocationsRetrieveContextsCall) Context(ctx context.Context) *ProjectsLocationsRetrieveContextsCall { - 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 *ProjectsLocationsRetrieveContextsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRetrieveContextsCall) 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.googlecloudaiplatformv1beta1retrievecontextsrequest) - 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, "v1beta1/{+parent}:retrieveContexts") - 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{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.retrieveContexts" call. -// Exactly one of *GoogleCloudAiplatformV1beta1RetrieveContextsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudAiplatformV1beta1RetrieveContextsResponse.ServerResponse.H -// eader 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 *ProjectsLocationsRetrieveContextsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1RetrieveContextsResponse, 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 := &GoogleCloudAiplatformV1beta1RetrieveContextsResponse{ - 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": "Retrieves relevant contexts for a query.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:retrieveContexts", - // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.retrieveContexts", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}:retrieveContexts", - // "request": { - // "$ref": "GoogleCloudAiplatformV1beta1RetrieveContextsRequest" - // }, - // "response": { - // "$ref": "GoogleCloudAiplatformV1beta1RetrieveContextsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "aiplatform.projects.locations.batchPredictionJobs.cancel": type ProjectsLocationsBatchPredictionJobsCancelCall struct { @@ -121861,32 +120794,38 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ... } -// method id "aiplatform.projects.locations.ragCorpora.create": +// method id "aiplatform.projects.locations.ragCorpora.operations.cancel": -type ProjectsLocationsRagCorporaCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1beta1ragcorpus *GoogleCloudAiplatformV1beta1RagCorpus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a RagCorpus. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - parent: The resource name of the Location to create the RagCorpus -// in. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsRagCorporaService) Create(parent string, googlecloudaiplatformv1beta1ragcorpus *GoogleCloudAiplatformV1beta1RagCorpus) *ProjectsLocationsRagCorporaCreateCall { - c := &ProjectsLocationsRagCorporaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1beta1ragcorpus = googlecloudaiplatformv1beta1ragcorpus +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsRagCorporaOperationsService) Cancel(name string) *ProjectsLocationsRagCorporaOperationsCancelCall { + c := &ProjectsLocationsRagCorporaOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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 *ProjectsLocationsRagCorporaCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaCreateCall { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -121894,21 +120833,21 @@ func (c *ProjectsLocationsRagCorporaCreateCall) Fields(s ...googleapi.Field) *Pr // 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 *ProjectsLocationsRagCorporaCreateCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaCreateCall { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsCancelCall { 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 *ProjectsLocationsRagCorporaCreateCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) 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_ { @@ -121916,14 +120855,9 @@ func (c *ProjectsLocationsRagCorporaCreateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1ragcorpus) - 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, "v1beta1/{+parent}/ragCorpora") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -121931,19 +120865,19 @@ func (c *ProjectsLocationsRagCorporaCreateCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.create" 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 +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.cancel" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -121962,7 +120896,7 @@ func (c *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -121974,28 +120908,25 @@ func (c *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a RagCorpus.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}:cancel", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.ragCorpora.create", + // "id": "aiplatform.projects.locations.ragCorpora.operations.cancel", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the Location to create the RagCorpus in. Format: `projects/{project}/locations/{location}`", + // "name": { + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/ragCorpora", - // "request": { - // "$ref": "GoogleCloudAiplatformV1beta1RagCorpus" - // }, + // "path": "v1beta1/{+name}:cancel", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -122004,9 +120935,9 @@ func (c *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) } -// method id "aiplatform.projects.locations.ragCorpora.delete": +// method id "aiplatform.projects.locations.ragCorpora.operations.delete": -type ProjectsLocationsRagCorporaDeleteCall struct { +type ProjectsLocationsRagCorporaOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -122014,62 +120945,204 @@ type ProjectsLocationsRagCorporaDeleteCall struct { header_ http.Header } -// Delete: Deletes a RagCorpus. +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. // -// - name: The name of the RagCorpus resource to be deleted. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *ProjectsLocationsRagCorporaService) Delete(name string) *ProjectsLocationsRagCorporaDeleteCall { - c := &ProjectsLocationsRagCorporaDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsRagCorporaOperationsService) Delete(name string) *ProjectsLocationsRagCorporaOperationsDeleteCall { + c := &ProjectsLocationsRagCorporaOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any -// RagFiles in this RagCorpus will also be deleted. Otherwise, the -// request will only work if the RagCorpus has no RagFiles. -func (c *ProjectsLocationsRagCorporaDeleteCall) Force(force bool) *ProjectsLocationsRagCorporaDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsDeleteCall { + 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 *ProjectsLocationsRagCorporaOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsDeleteCall { + 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 *ProjectsLocationsRagCorporaOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) 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, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", 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 "aiplatform.projects.locations.ragCorpora.operations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsRagCorporaOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "aiplatform.projects.locations.ragCorpora.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.ragCorpora.operations.get": + +type ProjectsLocationsRagCorporaOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsRagCorporaOperationsService) Get(name string) *ProjectsLocationsRagCorporaOperationsGetCall { + c := &ProjectsLocationsRagCorporaOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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 *ProjectsLocationsRagCorporaDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaDeleteCall { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsGetCall { 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 *ProjectsLocationsRagCorporaOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaOperationsGetCall { + 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 *ProjectsLocationsRagCorporaDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaDeleteCall { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsGetCall { 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 *ProjectsLocationsRagCorporaDeleteCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -122080,14 +121153,14 @@ func (c *ProjectsLocationsRagCorporaDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.delete" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.get" 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 *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -122118,23 +121191,18 @@ func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a RagCorpus.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}", - // "httpMethod": "DELETE", - // "id": "aiplatform.projects.locations.ragCorpora.delete", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "aiplatform.projects.locations.ragCorpora.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "force": { - // "description": "Optional. If set to true, any RagFiles in this RagCorpus will also be deleted. Otherwise, the request will only work if the RagCorpus has no RagFiles.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Required. The name of the RagCorpus resource to be deleted. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -122150,9 +121218,9 @@ func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "aiplatform.projects.locations.ragCorpora.get": +// method id "aiplatform.projects.locations.ragCorpora.operations.list": -type ProjectsLocationsRagCorporaGetCall struct { +type ProjectsLocationsRagCorporaOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -122161,176 +121229,34 @@ type ProjectsLocationsRagCorporaGetCall struct { header_ http.Header } -// Get: Gets a RagCorpus. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The name of the RagCorpus resource. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *ProjectsLocationsRagCorporaService) Get(name string) *ProjectsLocationsRagCorporaGetCall { - c := &ProjectsLocationsRagCorporaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsRagCorporaOperationsService) List(name string) *ProjectsLocationsRagCorporaOperationsListCall { + c := &ProjectsLocationsRagCorporaOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name 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 *ProjectsLocationsRagCorporaGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaGetCall { - 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 *ProjectsLocationsRagCorporaGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaGetCall { - 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 *ProjectsLocationsRagCorporaGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaGetCall { - 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 *ProjectsLocationsRagCorporaGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaGetCall) 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, "v1beta1/{+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 "aiplatform.projects.locations.ragCorpora.get" call. -// Exactly one of *GoogleCloudAiplatformV1beta1RagCorpus or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudAiplatformV1beta1RagCorpus.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 *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1RagCorpus, 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 := &GoogleCloudAiplatformV1beta1RagCorpus{ - 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 a RagCorpus.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}", - // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.ragCorpora.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the RagCorpus resource. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleCloudAiplatformV1beta1RagCorpus" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "aiplatform.projects.locations.ragCorpora.list": - -type ProjectsLocationsRagCorporaListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists RagCorpora in a Location. -// -// - parent: The resource name of the Location from which to list the -// RagCorpora. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsRagCorporaService) List(parent string) *ProjectsLocationsRagCorporaListCall { - c := &ProjectsLocationsRagCorporaListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsRagCorporaOperationsListCall) Filter(filter string) *ProjectsLocationsRagCorporaOperationsListCall { + c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsRagCorporaListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list -// page token. Typically obtained via -// ListRagCorporaResponse.next_page_token of the previous -// VertexRagDataService.ListRagCorpora call. -func (c *ProjectsLocationsRagCorporaListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaListCall { +// page token. +func (c *ProjectsLocationsRagCorporaOperationsListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -122338,7 +121264,7 @@ func (c *ProjectsLocationsRagCorporaListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRagCorporaListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -122348,7 +121274,7 @@ func (c *ProjectsLocationsRagCorporaListCall) Fields(s ...googleapi.Field) *Proj // 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 *ProjectsLocationsRagCorporaListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -122356,21 +121282,21 @@ func (c *ProjectsLocationsRagCorporaListCall) IfNoneMatch(entityTag string) *Pro // 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 *ProjectsLocationsRagCorporaListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsListCall { 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 *ProjectsLocationsRagCorporaListCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaOperationsListCall) 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_ { @@ -122383,7 +121309,7 @@ func (c *ProjectsLocationsRagCorporaListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/ragCorpora") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -122391,21 +121317,20 @@ func (c *ProjectsLocationsRagCorporaListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.list" call. -// Exactly one of *GoogleCloudAiplatformV1beta1ListRagCorporaResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudAiplatformV1beta1ListRagCorporaResponse.ServerResponse.Hea -// der 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 *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListRagCorporaResponse, error) { +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsRagCorporaOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -122424,7 +121349,7 @@ func (c *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1beta1ListRagCorporaResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -122436,36 +121361,41 @@ func (c *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists RagCorpora in a Location.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.ragCorpora.list", + // "id": "aiplatform.projects.locations.ragCorpora.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", + // "required": true, + // "type": "string" + // }, // "pageSize": { - // "description": "Optional. The standard list page size.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. The standard list page token. Typically obtained via ListRagCorporaResponse.next_page_token of the previous VertexRagDataService.ListRagCorpora call.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the Location from which to list the RagCorpora. Format: `projects/{project}/locations/{location}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/ragCorpora", + // "path": "v1beta1/{+name}/operations", // "response": { - // "$ref": "GoogleCloudAiplatformV1beta1ListRagCorporaResponse" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -122477,7 +121407,7 @@ func (c *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRagCorporaListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListRagCorporaResponse) error) error { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -122495,9 +121425,9 @@ func (c *ProjectsLocationsRagCorporaListCall) Pages(ctx context.Context, f func( } } -// method id "aiplatform.projects.locations.ragCorpora.operations.cancel": +// method id "aiplatform.projects.locations.ragCorpora.operations.wait": -type ProjectsLocationsRagCorporaOperationsCancelCall struct { +type ProjectsLocationsRagCorporaOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -122505,163 +121435,37 @@ type ProjectsLocationsRagCorporaOperationsCancelCall struct { header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Wait: Waits until the specified long-running operation is done or +// reaches at most a specified timeout, returning the latest state. If +// the operation is already done, the latest state is immediately +// returned. If the timeout specified is greater than the default +// HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does +// not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. +// Note that this method is on a best-effort basis. It may return the +// latest state before the specified timeout (including immediately), +// meaning even an immediate response is no guarantee that the operation +// is done. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsRagCorporaOperationsService) Cancel(name string) *ProjectsLocationsRagCorporaOperationsCancelCall { - c := &ProjectsLocationsRagCorporaOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsRagCorporaOperationsService) Wait(name string) *ProjectsLocationsRagCorporaOperationsWaitCall { + c := &ProjectsLocationsRagCorporaOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name 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 *ProjectsLocationsRagCorporaOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsCancelCall { - 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 *ProjectsLocationsRagCorporaOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsCancelCall { - 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 *ProjectsLocationsRagCorporaOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaOperationsCancelCall) 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, "v1beta1/{+name}:cancel") - 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 "aiplatform.projects.locations.ragCorpora.operations.cancel" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *ProjectsLocationsRagCorporaOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ - 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": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.ragCorpora.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:cancel", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "aiplatform.projects.locations.ragCorpora.operations.delete": - -type ProjectsLocationsRagCorporaOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. -// -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsRagCorporaOperationsService) Delete(name string) *ProjectsLocationsRagCorporaOperationsDeleteCall { - c := &ProjectsLocationsRagCorporaOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// Timeout sets the optional parameter "timeout": The maximum duration +// to wait before timing out. If left blank, the wait will be at most +// the time permitted by the underlying HTTP/RPC protocol. If RPC +// context deadline is also specified, the shorter one will be used. +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsRagCorporaOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) 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 *ProjectsLocationsRagCorporaOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsDeleteCall { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -122669,21 +121473,21 @@ func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Fields(s ...googleapi. // 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 *ProjectsLocationsRagCorporaOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsDeleteCall { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsWaitCall { 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 *ProjectsLocationsRagCorporaOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) 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_ { @@ -122693,9 +121497,9 @@ func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -122706,14 +121510,14 @@ func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.operations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.wait" 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 *ProjectsLocationsRagCorporaOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -122732,7 +121536,7 @@ func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -122744,25 +121548,31 @@ func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "aiplatform.projects.locations.ragCorpora.operations.delete", + // "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}:wait", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.ragCorpora.operations.wait", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "The name of the operation resource to wait on.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" + // }, + // "timeout": { + // "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + // "format": "google-duration", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+name}:wait", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -122771,1143 +121581,6 @@ func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Do(opts ...googleapi.C } -// method id "aiplatform.projects.locations.ragCorpora.operations.get": - -type ProjectsLocationsRagCorporaOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsRagCorporaOperationsService) Get(name string) *ProjectsLocationsRagCorporaOperationsGetCall { - c := &ProjectsLocationsRagCorporaOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsLocationsRagCorporaOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsGetCall { - 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 *ProjectsLocationsRagCorporaOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaOperationsGetCall { - 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 *ProjectsLocationsRagCorporaOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsGetCall { - 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 *ProjectsLocationsRagCorporaOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaOperationsGetCall) 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, "v1beta1/{+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 "aiplatform.projects.locations.ragCorpora.operations.get" 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 *ProjectsLocationsRagCorporaOperationsGetCall) 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": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.ragCorpora.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "aiplatform.projects.locations.ragCorpora.operations.list": - -type ProjectsLocationsRagCorporaOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. -// -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsRagCorporaOperationsService) List(name string) *ProjectsLocationsRagCorporaOperationsListCall { - c := &ProjectsLocationsRagCorporaOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsRagCorporaOperationsListCall) Filter(filter string) *ProjectsLocationsRagCorporaOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsRagCorporaOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsRagCorporaOperationsListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - 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 *ProjectsLocationsRagCorporaOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsListCall { - 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 *ProjectsLocationsRagCorporaOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaOperationsListCall { - 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 *ProjectsLocationsRagCorporaOperationsListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsListCall { - 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 *ProjectsLocationsRagCorporaOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaOperationsListCall) 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, "v1beta1/{+name}/operations") - 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 "aiplatform.projects.locations.ragCorpora.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsRagCorporaOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ - 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations", - // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.ragCorpora.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}/operations", - // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRagCorporaOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "aiplatform.projects.locations.ragCorpora.operations.wait": - -type ProjectsLocationsRagCorporaOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits until the specified long-running operation is done or -// reaches at most a specified timeout, returning the latest state. If -// the operation is already done, the latest state is immediately -// returned. If the timeout specified is greater than the default -// HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does -// not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. -// Note that this method is on a best-effort basis. It may return the -// latest state before the specified timeout (including immediately), -// meaning even an immediate response is no guarantee that the operation -// is done. -// -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsRagCorporaOperationsService) Wait(name string) *ProjectsLocationsRagCorporaOperationsWaitCall { - c := &ProjectsLocationsRagCorporaOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration -// to wait before timing out. If left blank, the wait will be at most -// the time permitted by the underlying HTTP/RPC protocol. If RPC -// context deadline is also specified, the shorter one will be used. -func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsRagCorporaOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - 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 *ProjectsLocationsRagCorporaOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsWaitCall { - 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 *ProjectsLocationsRagCorporaOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsWaitCall { - 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 *ProjectsLocationsRagCorporaOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaOperationsWaitCall) 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, "v1beta1/{+name}:wait") - 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 "aiplatform.projects.locations.ragCorpora.operations.wait" 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 *ProjectsLocationsRagCorporaOperationsWaitCall) 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": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}:wait", - // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.ragCorpora.operations.wait", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to wait on.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "timeout": { - // "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", - // "format": "google-duration", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:wait", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "aiplatform.projects.locations.ragCorpora.ragFiles.delete": - -type ProjectsLocationsRagCorporaRagFilesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a RagFile. -// -// - name: The name of the RagFile resource to be deleted. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/rag -// Files/{rag_file}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) Delete(name string) *ProjectsLocationsRagCorporaRagFilesDeleteCall { - c := &ProjectsLocationsRagCorporaRagFilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsLocationsRagCorporaRagFilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesDeleteCall { - 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 *ProjectsLocationsRagCorporaRagFilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesDeleteCall { - 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 *ProjectsLocationsRagCorporaRagFilesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) 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, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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 "aiplatform.projects.locations.ragCorpora.ragFiles.delete" 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 *ProjectsLocationsRagCorporaRagFilesDeleteCall) 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": "Deletes a RagFile.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}", - // "httpMethod": "DELETE", - // "id": "aiplatform.projects.locations.ragCorpora.ragFiles.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the RagFile resource to be deleted. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "aiplatform.projects.locations.ragCorpora.ragFiles.get": - -type ProjectsLocationsRagCorporaRagFilesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a RagFile. -// -// - name: The name of the RagFile resource. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/rag -// Files/{rag_file}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) Get(name string) *ProjectsLocationsRagCorporaRagFilesGetCall { - c := &ProjectsLocationsRagCorporaRagFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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 *ProjectsLocationsRagCorporaRagFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesGetCall { - 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 *ProjectsLocationsRagCorporaRagFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesGetCall { - 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 *ProjectsLocationsRagCorporaRagFilesGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesGetCall { - 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 *ProjectsLocationsRagCorporaRagFilesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) 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, "v1beta1/{+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 "aiplatform.projects.locations.ragCorpora.ragFiles.get" call. -// Exactly one of *GoogleCloudAiplatformV1beta1RagFile or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudAiplatformV1beta1RagFile.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 *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1RagFile, 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 := &GoogleCloudAiplatformV1beta1RagFile{ - 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 a RagFile.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}", - // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.ragCorpora.ragFiles.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the RagFile resource. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "GoogleCloudAiplatformV1beta1RagFile" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "aiplatform.projects.locations.ragCorpora.ragFiles.import": - -type ProjectsLocationsRagCorporaRagFilesImportCall struct { - s *Service - parent string - googlecloudaiplatformv1beta1importragfilesrequest *GoogleCloudAiplatformV1beta1ImportRagFilesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Import: Import files from Google Cloud Storage or Google Drive into a -// RagCorpus. -// -// - parent: The name of the RagCorpus resource into which to import -// files. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) Import(parent string, googlecloudaiplatformv1beta1importragfilesrequest *GoogleCloudAiplatformV1beta1ImportRagFilesRequest) *ProjectsLocationsRagCorporaRagFilesImportCall { - c := &ProjectsLocationsRagCorporaRagFilesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1beta1importragfilesrequest = googlecloudaiplatformv1beta1importragfilesrequest - 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 *ProjectsLocationsRagCorporaRagFilesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesImportCall { - 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 *ProjectsLocationsRagCorporaRagFilesImportCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesImportCall { - 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 *ProjectsLocationsRagCorporaRagFilesImportCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaRagFilesImportCall) 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.googlecloudaiplatformv1beta1importragfilesrequest) - 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, "v1beta1/{+parent}/ragFiles:import") - 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{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.import" 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 *ProjectsLocationsRagCorporaRagFilesImportCall) 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": "Import files from Google Cloud Storage or Google Drive into a RagCorpus.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles:import", - // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.ragCorpora.ragFiles.import", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The name of the RagCorpus resource into which to import files. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/ragFiles:import", - // "request": { - // "$ref": "GoogleCloudAiplatformV1beta1ImportRagFilesRequest" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "aiplatform.projects.locations.ragCorpora.ragFiles.list": - -type ProjectsLocationsRagCorporaRagFilesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists RagFiles in a RagCorpus. -// -// - parent: The resource name of the RagCorpus from which to list the -// RagFiles. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) List(parent string) *ProjectsLocationsRagCorporaRagFilesListCall { - c := &ProjectsLocationsRagCorporaRagFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaRagFilesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. Typically obtained via -// ListRagFilesResponse.next_page_token of the previous -// VertexRagDataService.ListRagFiles call. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaRagFilesListCall { - c.urlParams_.Set("pageToken", pageToken) - 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 *ProjectsLocationsRagCorporaRagFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesListCall { - 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 *ProjectsLocationsRagCorporaRagFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesListCall { - 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 *ProjectsLocationsRagCorporaRagFilesListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesListCall { - 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 *ProjectsLocationsRagCorporaRagFilesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRagCorporaRagFilesListCall) 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, "v1beta1/{+parent}/ragFiles") - 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{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.list" call. -// Exactly one of *GoogleCloudAiplatformV1beta1ListRagFilesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudAiplatformV1beta1ListRagFilesResponse.ServerResponse.Heade -// r 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 *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListRagFilesResponse, 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 := &GoogleCloudAiplatformV1beta1ListRagFilesResponse{ - 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": "Lists RagFiles in a RagCorpus.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles", - // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.ragCorpora.ragFiles.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional. The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The standard list page token. Typically obtained via ListRagFilesResponse.next_page_token of the previous VertexRagDataService.ListRagFiles call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the RagCorpus from which to list the RagFiles. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/ragFiles", - // "response": { - // "$ref": "GoogleCloudAiplatformV1beta1ListRagFilesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListRagFilesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - // method id "aiplatform.projects.locations.ragCorpora.ragFiles.operations.cancel": type ProjectsLocationsRagCorporaRagFilesOperationsCancelCall struct { diff --git a/api-list.json b/api-list.json index 5eba0a49ab0..ac16ef20081 100644 --- a/api-list.json +++ b/api-list.json @@ -3111,6 +3111,21 @@ "documentationLink": "https://firebase.google.com", "preferred": false }, + { + "kind": "discovery#directoryItem", + "id": "firebaseml:v2beta", + "name": "firebaseml", + "version": "v2beta", + "title": "Firebase ML API", + "description": "Access custom machine learning models hosted via Firebase ML.", + "discoveryRestUrl": "https://firebaseml.googleapis.com/$discovery/rest?version=v2beta", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://firebase.google.com", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "firebaseml:v1", diff --git a/cloudsupport/v2/cloudsupport-api.json b/cloudsupport/v2/cloudsupport-api.json index 53ffe0633d4..59f964fea73 100644 --- a/cloudsupport/v2/cloudsupport-api.json +++ b/cloudsupport/v2/cloudsupport-api.json @@ -552,7 +552,7 @@ } } }, - "revision": "20240303", + "revision": "20240403", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { @@ -778,31 +778,32 @@ "type": "object" }, "Comment": { - "description": "Case comments are the main way Google Support communicates with a user who has opened a case. When a user responds to Google Support, the user's responses also appear as comments.", + "description": "A comment associated with a support case. Case comments are the primary way for Google Support to communicate with a user who has opened a case. When a user responds to Google Support, the user's responses also appear as comments.", "id": "Comment", "properties": { "body": { - "description": "The full comment body. Maximum of 12800 characters. This can contain rich text syntax.", + "description": "The full comment body. Maximum of 12800 characters.", "type": "string" }, "createTime": { - "description": "Output only. The time when this comment was created.", + "description": "Output only. The time when the comment was created.", "format": "google-datetime", "readOnly": true, "type": "string" }, "creator": { "$ref": "Actor", - "description": "Output only. The user or Google Support agent created this comment.", + "description": "Output only. The user or Google Support agent who created the comment.", "readOnly": true }, "name": { - "description": "Output only. The resource name for the comment.", + "description": "Output only. Identifier. The resource name of the comment.", "readOnly": true, "type": "string" }, "plainTextBody": { - "description": "Output only. DEPRECATED. An automatically generated plain text version of body with all rich text syntax stripped.", + "deprecated": true, + "description": "Output only. DEPRECATED. DO NOT USE. A duplicate of the `body` field. This field is only present for legacy reasons.", "readOnly": true, "type": "string" } diff --git a/cloudsupport/v2/cloudsupport-gen.go b/cloudsupport/v2/cloudsupport-gen.go index 2707e26ca16..e2ce145b128 100644 --- a/cloudsupport/v2/cloudsupport-gen.go +++ b/cloudsupport/v2/cloudsupport-gen.go @@ -536,26 +536,26 @@ func (s *CaseClassification) MarshalJSON() ([]byte, error) { type CloseCaseRequest struct { } -// Comment: Case comments are the main way Google Support communicates -// with a user who has opened a case. When a user responds to Google -// Support, the user's responses also appear as comments. +// Comment: A comment associated with a support case. Case comments are +// the primary way for Google Support to communicate with a user who has +// opened a case. When a user responds to Google Support, the user's +// responses also appear as comments. type Comment struct { - // Body: The full comment body. Maximum of 12800 characters. This can - // contain rich text syntax. + // Body: The full comment body. Maximum of 12800 characters. Body string `json:"body,omitempty"` - // CreateTime: Output only. The time when this comment was created. + // CreateTime: Output only. The time when the comment was created. CreateTime string `json:"createTime,omitempty"` - // Creator: Output only. The user or Google Support agent created this - // comment. + // Creator: Output only. The user or Google Support agent who created + // the comment. Creator *Actor `json:"creator,omitempty"` - // Name: Output only. The resource name for the comment. + // Name: Output only. Identifier. The resource name of the comment. Name string `json:"name,omitempty"` - // PlainTextBody: Output only. DEPRECATED. An automatically generated - // plain text version of body with all rich text syntax stripped. + // PlainTextBody: Output only. DEPRECATED. DO NOT USE. A duplicate of + // the `body` field. This field is only present for legacy reasons. PlainTextBody string `json:"plainTextBody,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/cloudsupport/v2beta/cloudsupport-api.json b/cloudsupport/v2beta/cloudsupport-api.json index 4fcd9728d47..4b986c63e37 100644 --- a/cloudsupport/v2beta/cloudsupport-api.json +++ b/cloudsupport/v2beta/cloudsupport-api.json @@ -548,7 +548,7 @@ } } }, - "revision": "20240320", + "revision": "20240403", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { @@ -794,31 +794,32 @@ "type": "object" }, "Comment": { - "description": "Case comments are the main way Google Support communicates with a user who has opened a case. When a user responds to Google Support, the user's responses also appear as comments.", + "description": "A comment associated with a support case. Case comments are the primary way for Google Support to communicate with a user who has opened a case. When a user responds to Google Support, the user's responses also appear as comments.", "id": "Comment", "properties": { "body": { - "description": "The full comment body. Maximum of 12800 characters. This can contain rich text syntax.", + "description": "The full comment body. Maximum of 12800 characters.", "type": "string" }, "createTime": { - "description": "Output only. The time when this comment was created.", + "description": "Output only. The time when the comment was created.", "format": "google-datetime", "readOnly": true, "type": "string" }, "creator": { "$ref": "Actor", - "description": "Output only. The user or Google Support agent created this comment.", + "description": "Output only. The user or Google Support agent who created the comment.", "readOnly": true }, "name": { - "description": "Output only. The resource name for the comment.", + "description": "Output only. Identifier. The resource name of the comment.", "readOnly": true, "type": "string" }, "plainTextBody": { - "description": "Output only. DEPRECATED. An automatically generated plain text version of body with all rich text syntax stripped.", + "deprecated": true, + "description": "Output only. DEPRECATED. DO NOT USE. A duplicate of the `body` field. This field is only present for legacy reasons.", "readOnly": true, "type": "string" } diff --git a/cloudsupport/v2beta/cloudsupport-gen.go b/cloudsupport/v2beta/cloudsupport-gen.go index 5a5e0e9e9ac..e07f98be5f9 100644 --- a/cloudsupport/v2beta/cloudsupport-gen.go +++ b/cloudsupport/v2beta/cloudsupport-gen.go @@ -553,26 +553,26 @@ func (s *CaseClassification) MarshalJSON() ([]byte, error) { type CloseCaseRequest struct { } -// Comment: Case comments are the main way Google Support communicates -// with a user who has opened a case. When a user responds to Google -// Support, the user's responses also appear as comments. +// Comment: A comment associated with a support case. Case comments are +// the primary way for Google Support to communicate with a user who has +// opened a case. When a user responds to Google Support, the user's +// responses also appear as comments. type Comment struct { - // Body: The full comment body. Maximum of 12800 characters. This can - // contain rich text syntax. + // Body: The full comment body. Maximum of 12800 characters. Body string `json:"body,omitempty"` - // CreateTime: Output only. The time when this comment was created. + // CreateTime: Output only. The time when the comment was created. CreateTime string `json:"createTime,omitempty"` - // Creator: Output only. The user or Google Support agent created this - // comment. + // Creator: Output only. The user or Google Support agent who created + // the comment. Creator *Actor `json:"creator,omitempty"` - // Name: Output only. The resource name for the comment. + // Name: Output only. Identifier. The resource name of the comment. Name string `json:"name,omitempty"` - // PlainTextBody: Output only. DEPRECATED. An automatically generated - // plain text version of body with all rich text syntax stripped. + // PlainTextBody: Output only. DEPRECATED. DO NOT USE. A duplicate of + // the `body` field. This field is only present for legacy reasons. PlainTextBody string `json:"plainTextBody,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 2ca5a236812..4d6990a0461 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -41579,7 +41579,7 @@ } } }, - "revision": "20240324", + "revision": "20240326", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -69821,15 +69821,15 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." }, "defaultService": { - "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", + "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -88151,7 +88151,7 @@ "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { - "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", "type": "string" }, "defaultUrlRedirect": { diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index c495caaf4e0..f876047969f 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -41806,10 +41806,12 @@ type PathMatcher struct { // before forwarding the request to the selected backend. If // defaultRouteAction specifies any weightedBackendServices, // defaultService must not be set. Conversely if defaultService is set, - // defaultRouteAction cannot contain any weightedBackendServices. Only - // one of defaultRouteAction or defaultUrlRedirect must be set. URL maps - // for classic Application Load Balancers only support the urlRewrite - // action within a path matcher's defaultRouteAction. + // defaultRouteAction cannot contain any weightedBackendServices. If + // defaultRouteAction is specified, don't set defaultUrlRedirect. If + // defaultRouteAction.weightedBackendServices is specified, don't set + // defaultService. URL maps for classic Application Load Balancers only + // support the urlRewrite action within a path matcher's + // defaultRouteAction. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL to the BackendService @@ -41824,19 +41826,19 @@ type PathMatcher struct { // effect before sending the request to the backend. However, if // defaultService is specified, defaultRouteAction cannot contain any // weightedBackendServices. Conversely, if defaultRouteAction specifies - // any weightedBackendServices, defaultService must not be specified. - // Only one of defaultService, defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService must be set. Authorization - // requires one or more of the following Google IAM permissions on the - // specified resource default_service: - compute.backendBuckets.use - - // compute.backendServices.use + // any weightedBackendServices, defaultService must not be specified. If + // defaultService is specified, then set either defaultUrlRedirect or + // defaultRouteAction.weightedBackendService. Don't set both. + // Authorization requires one or more of the following Google IAM + // permissions on the specified resource default_service: - + // compute.backendBuckets.use - compute.backendServices.use DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified pathRules or // routeRules match, the request is redirected to a URL specified by - // defaultUrlRedirect. If defaultUrlRedirect is specified, - // defaultService or defaultRouteAction must not be set. Not supported - // when the URL map is bound to a target gRPC proxy. + // defaultUrlRedirect. If defaultUrlRedirect is specified, then set + // either defaultService or defaultRouteAction. Don't set both. Not + // supported when the URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this @@ -66962,10 +66964,11 @@ type UrlMap struct { // backend. However, if defaultService is specified, defaultRouteAction // cannot contain any weightedBackendServices. Conversely, if // routeAction specifies any weightedBackendServices, service must not - // be specified. Only one of defaultService, defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService must be set. defaultService - // has no effect when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. + // be specified. If defaultService is specified, then set either + // defaultUrlRedirect , or defaultRouteAction.weightedBackendService + // Don't set both. defaultService has no effect when the URL map is + // bound to a target gRPC proxy that has the validateForProxyless field + // set to true. DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified hostRules match, the diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index e964b1c538e..32bdbf22764 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -37371,7 +37371,7 @@ } } }, - "revision": "20240324", + "revision": "20240326", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -63875,15 +63875,15 @@ "properties": { "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." }, "defaultService": { - "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", + "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -80952,7 +80952,7 @@ "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { - "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", "type": "string" }, "defaultUrlRedirect": { diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index bb13ebd1f20..65c6e18456a 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -39146,10 +39146,12 @@ type PathMatcher struct { // before forwarding the request to the selected backend. If // defaultRouteAction specifies any weightedBackendServices, // defaultService must not be set. Conversely if defaultService is set, - // defaultRouteAction cannot contain any weightedBackendServices. Only - // one of defaultRouteAction or defaultUrlRedirect must be set. URL maps - // for classic Application Load Balancers only support the urlRewrite - // action within a path matcher's defaultRouteAction. + // defaultRouteAction cannot contain any weightedBackendServices. If + // defaultRouteAction is specified, don't set defaultUrlRedirect. If + // defaultRouteAction.weightedBackendServices is specified, don't set + // defaultService. URL maps for classic Application Load Balancers only + // support the urlRewrite action within a path matcher's + // defaultRouteAction. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL to the BackendService @@ -39164,19 +39166,19 @@ type PathMatcher struct { // effect before sending the request to the backend. However, if // defaultService is specified, defaultRouteAction cannot contain any // weightedBackendServices. Conversely, if defaultRouteAction specifies - // any weightedBackendServices, defaultService must not be specified. - // Only one of defaultService, defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService must be set. Authorization - // requires one or more of the following Google IAM permissions on the - // specified resource default_service: - compute.backendBuckets.use - - // compute.backendServices.use + // any weightedBackendServices, defaultService must not be specified. If + // defaultService is specified, then set either defaultUrlRedirect or + // defaultRouteAction.weightedBackendService. Don't set both. + // Authorization requires one or more of the following Google IAM + // permissions on the specified resource default_service: - + // compute.backendBuckets.use - compute.backendServices.use DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified pathRules or // routeRules match, the request is redirected to a URL specified by - // defaultUrlRedirect. If defaultUrlRedirect is specified, - // defaultService or defaultRouteAction must not be set. Not supported - // when the URL map is bound to a target gRPC proxy. + // defaultUrlRedirect. If defaultUrlRedirect is specified, then set + // either defaultService or defaultRouteAction. Don't set both. Not + // supported when the URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this @@ -62448,10 +62450,11 @@ type UrlMap struct { // backend. However, if defaultService is specified, defaultRouteAction // cannot contain any weightedBackendServices. Conversely, if // routeAction specifies any weightedBackendServices, service must not - // be specified. Only one of defaultService, defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService must be set. defaultService - // has no effect when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. + // be specified. If defaultService is specified, then set either + // defaultUrlRedirect , or defaultRouteAction.weightedBackendService + // Don't set both. defaultService has no effect when the URL map is + // bound to a target gRPC proxy that has the validateForProxyless field + // set to true. DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified hostRules match, the diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 34f08287b5b..b9c5050277d 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -2838,6 +2838,39 @@ "scopes": [ "https://www.googleapis.com/auth/content" ] + }, + "triggeraction": { + "description": "Start an action. The action can be requested by merchants in third-party application. Before merchants can request the action, the third-party application needs to show them action specific content and display a user input form. The action can be successfully started only once all `required` inputs are provided. If any `required` input is missing, or invalid value was provided, the service will return 400 error. Validation errors will contain Ids for all problematic field together with translated, human readable error messages that can be shown to the user.", + "flatPath": "{merchantId}/merchantsupport/triggeraction", + "httpMethod": "POST", + "id": "content.merchantsupport.triggeraction", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "languageCode": { + "description": "Optional. Language code [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) used to localize the response. If not set, the result will be in default language `en-US`.", + "location": "query", + "type": "string" + }, + "merchantId": { + "description": "Required. The ID of the merchant's account.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{merchantId}/merchantsupport/triggeraction", + "request": { + "$ref": "TriggerActionPayload" + }, + "response": { + "$ref": "TriggerActionResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] } } }, @@ -6186,7 +6219,7 @@ } } }, - "revision": "20240326", + "revision": "20240403", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -7485,6 +7518,10 @@ "$ref": "BuiltInSimpleAction", "description": "Action implemented and performed in (your) third-party application. The application should point the merchant to the place, where they can access the corresponding functionality or provide instructions, if the specific functionality is not available." }, + "builtinUserInputAction": { + "$ref": "BuiltInUserInputAction", + "description": "Action implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant as specified for given action. They can trigger the action only when they provided all required inputs." + }, "buttonLabel": { "description": "Label of the action button.", "type": "string" @@ -7507,6 +7544,62 @@ }, "type": "object" }, + "ActionFlow": { + "description": "Flow that can be selected for an action. When merchant selects a flow, application should open a dialog with more information and input form.", + "id": "ActionFlow", + "properties": { + "dialogButtonLabel": { + "description": "Label for the button to trigger the action from the action dialog. For example: \"Request review\"", + "type": "string" + }, + "dialogCallout": { + "$ref": "Callout", + "description": "Important message to be highlighted in the request dialog. For example: \"You can only request a review for disagreeing with this issue once. If it's not approved, you'll need to fix the issue and wait a few days before you can request another review.\"" + }, + "dialogMessage": { + "$ref": "TextWithTooltip", + "description": "Message displayed in the request dialog. For example: \"Make sure you've fixed all your country-specific issues. If not, you may have to wait 7 days to request another review\". There may be an more information to be shown in a tooltip." + }, + "dialogTitle": { + "description": "Title of the request dialog. For example: \"Before you request a review\"", + "type": "string" + }, + "id": { + "description": "Not for display but need to be sent back for the selected action flow.", + "type": "string" + }, + "inputs": { + "description": "A list of input fields.", + "items": { + "$ref": "InputField" + }, + "type": "array" + }, + "label": { + "description": "Text value describing the intent for the action flow. It can be used as an input label if merchant needs to pick one of multiple flows. For example: \"I disagree with the issue\"", + "type": "string" + } + }, + "type": "object" + }, + "ActionInput": { + "description": "Input provided by the merchant.", + "id": "ActionInput", + "properties": { + "actionFlowId": { + "description": "Required. Id of the selected action flow.", + "type": "string" + }, + "inputValues": { + "description": "Required. Values for input fields.", + "items": { + "$ref": "InputValue" + }, + "type": "array" + } + }, + "type": "object" + }, "ActionReason": { "description": "A single reason why the action is not available.", "id": "ActionReason", @@ -7855,6 +7948,24 @@ }, "type": "object" }, + "BuiltInUserInputAction": { + "description": "Action that is implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant. They can start the action only when they provided all required inputs. The application will request processing of the action by calling the [triggeraction method](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction).", + "id": "BuiltInUserInputAction", + "properties": { + "actionContext": { + "description": "Internal details. Not for display but need to be sent back when triggering the action.", + "type": "string" + }, + "flows": { + "description": "Actions may provide multiple different flows. Merchant selects one that fits best to their intent. Selecting the flow is the first step in user's interaction with the action. It affects what input fields will be available and required and also how the request will be processed.", + "items": { + "$ref": "ActionFlow" + }, + "type": "array" + } + }, + "type": "object" + }, "BusinessDayConfig": { "id": "BusinessDayConfig", "properties": { @@ -7966,6 +8077,33 @@ }, "type": "object" }, + "Callout": { + "description": "An important message that should be highlighted. Usually displayed as a banner.", + "id": "Callout", + "properties": { + "fullMessage": { + "$ref": "TextWithTooltip", + "description": "A full message that needs to be shown to the merchant." + }, + "styleHint": { + "description": "Can be used to render messages with different severity in different styles. Snippets off all types contain important information that should be displayed to merchants.", + "enum": [ + "CALLOUT_STYLE_HINT_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "The most important type of information highlighting problems, like an unsuccessful outcome of previously requested actions.", + "Information warning about pending problems, risks or deadlines.", + "Default severity for important information like pending status of previously requested action or cooldown for re-review." + ], + "type": "string" + } + }, + "type": "object" + }, "CaptureOrderRequest": { "description": "Request message for the CaptureOrder method.", "id": "CaptureOrderRequest", @@ -9677,6 +9815,165 @@ }, "type": "object" }, + "InputField": { + "description": "Input field that needs to be available to the merchant. If the field is marked as required, then a value needs to be provided for a successful processing of the request.", + "id": "InputField", + "properties": { + "checkboxInput": { + "$ref": "InputFieldCheckboxInput", + "description": "Input field to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox)." + }, + "choiceInput": { + "$ref": "InputFieldChoiceInput", + "description": "Input field to select one of the offered choices. Corresponds to the [html input type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio)." + }, + "id": { + "description": "Not for display but need to be sent back for the given input field.", + "type": "string" + }, + "label": { + "$ref": "TextWithTooltip", + "description": "Input field label. There may be more information to be shown in a tooltip." + }, + "required": { + "description": "Whether the field is required. The action button needs to stay disabled till values for all required fields are provided.", + "type": "boolean" + }, + "textInput": { + "$ref": "InputFieldTextInput", + "description": "Input field to provide text information. Corresponds to the [html input type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) or [html textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." + } + }, + "type": "object" + }, + "InputFieldCheckboxInput": { + "description": "Checkbox input allows merchants to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). If merchant checks the box, the input value for the field is `true`, otherwise it is `false`. This type of input is often used as a confirmation that the merchant completed required steps before they are allowed to start the action. In such a case, the input field is marked as required and the button to trigger the action should stay disabled until the merchant checks the box.", + "id": "InputFieldCheckboxInput", + "properties": {}, + "type": "object" + }, + "InputFieldChoiceInput": { + "description": "Choice input allows merchants to select one of the offered choices. Some choices may be linked to additional input fields that should be displayed under or next to the choice option. The value for the additional input field needs to be provided only when the specific choice is selected by the merchant. For example, additional input field can be hidden or disabled until the merchant selects the specific choice.", + "id": "InputFieldChoiceInput", + "properties": { + "options": { + "description": "A list of choices. Only one option can be selected.", + "items": { + "$ref": "InputFieldChoiceInputChoiceInputOption" + }, + "type": "array" + } + }, + "type": "object" + }, + "InputFieldChoiceInputChoiceInputOption": { + "description": "A choice that merchant can select.", + "id": "InputFieldChoiceInputChoiceInputOption", + "properties": { + "additionalInput": { + "$ref": "InputField", + "description": "Input that should be displayed when this option is selected. The additional input will not contain a `ChoiceInput`." + }, + "id": { + "description": "Not for display but need to be sent back for the selected choice option.", + "type": "string" + }, + "label": { + "$ref": "TextWithTooltip", + "description": "Short description of the choice option. There may be more information to be shown as a tooltip." + } + }, + "type": "object" + }, + "InputFieldTextInput": { + "description": "Text input allows merchants to provide a text value.", + "id": "InputFieldTextInput", + "properties": { + "additionalInfo": { + "$ref": "TextWithTooltip", + "description": "Additional info regarding the field to be displayed to merchant. For example, warning to not include personal identifiable information. There may be more information to be shown in a tooltip." + }, + "ariaLabel": { + "description": "Text to be used as the [aria label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the input.", + "type": "string" + }, + "formatInfo": { + "description": "Information about the required format. If present, it should be shown close to the input field to help merchants to provide a correct value. For example: \"VAT numbers should be in a format similar to SK9999999999\"", + "type": "string" + }, + "type": { + "description": "Type of the text input", + "enum": [ + "TEXT_INPUT_TYPE_UNSPECIFIED", + "GENERIC_SHORT_TEXT", + "GENERIC_LONG_TEXT" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Used when a short text is expected. The field can be rendered as a [text field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text).", + "Used when a longer text is expected. The field should be rendered as a [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." + ], + "type": "string" + } + }, + "type": "object" + }, + "InputValue": { + "description": "Input provided by the merchant for input field.", + "id": "InputValue", + "properties": { + "checkboxInputValue": { + "$ref": "InputValueCheckboxInputValue", + "description": "Value for checkbox input field." + }, + "choiceInputValue": { + "$ref": "InputValueChoiceInputValue", + "description": "Value for choice input field." + }, + "inputFieldId": { + "description": "Required. Id of the corresponding input field.", + "type": "string" + }, + "textInputValue": { + "$ref": "InputValueTextInputValue", + "description": "Value for text input field." + } + }, + "type": "object" + }, + "InputValueCheckboxInputValue": { + "description": "Value for checkbox input field.", + "id": "InputValueCheckboxInputValue", + "properties": { + "value": { + "description": "Required. True if the merchant checked the box field. False otherwise.", + "type": "boolean" + } + }, + "type": "object" + }, + "InputValueChoiceInputValue": { + "description": "Value for choice input field.", + "id": "InputValueChoiceInputValue", + "properties": { + "choiceInputOptionId": { + "description": "Required. Id of the option that was selected by the merchant.", + "type": "string" + } + }, + "type": "object" + }, + "InputValueTextInputValue": { + "description": "Value for text input field.", + "id": "InputValueTextInputValue", + "properties": { + "value": { + "description": "Required. Text provided by the merchant.", + "type": "string" + } + }, + "type": "object" + }, "InsertCheckoutSettingsRequest": { "description": "Request message for the `InsertCheckoutSettings` method.", "id": "InsertCheckoutSettingsRequest", @@ -14140,6 +14437,14 @@ "description": "The source of the offer, that is, how the offer was created. Acceptable values are: - \"`api`\" - \"`crawl`\" - \"`feed`\" ", "type": "string" }, + "structuredDescription": { + "$ref": "ProductStructuredDescription", + "description": "Structured description, for algorithmically (AI)-generated descriptions." + }, + "structuredTitle": { + "$ref": "ProductStructuredTitle", + "description": "Structured title, for algorithmically (AI)-generated titles." + }, "subscriptionCost": { "$ref": "ProductSubscriptionCost", "description": "Number of periods (months or years) and amount of payment per period for an item with an associated subscription contract." @@ -14672,6 +14977,36 @@ }, "type": "object" }, + "ProductStructuredDescription": { + "description": "Structured description, for algorithmically (AI)-generated descriptions. See [description](https://support.google.com/merchants/answer/6324468#When_to_use) for more information.", + "id": "ProductStructuredDescription", + "properties": { + "content": { + "description": "Required. The description text. Maximum length is 5000 characters.", + "type": "string" + }, + "digitalSourceType": { + "description": "Optional. The digital source type. Acceptable values are: - \"`trained_algorithmic_media`\" - \"`default`\" ", + "type": "string" + } + }, + "type": "object" + }, + "ProductStructuredTitle": { + "description": "Structured title, for algorithmically (AI)-generated titles. See [title](https://support.google.com/merchants/answer/6324415#Whentouse) for more information.", + "id": "ProductStructuredTitle", + "properties": { + "content": { + "description": "Required. The title text. Maximum length is 150 characters.", + "type": "string" + }, + "digitalSourceType": { + "description": "Optional. The digital source type. Acceptable values are: - \"`trained_algorithmic_media`\" - \"`default`\" ", + "type": "string" + } + }, + "type": "object" + }, "ProductSubscriptionCost": { "id": "ProductSubscriptionCost", "properties": { @@ -16062,6 +16397,20 @@ "Returns the detail of the issue as a pre-rendered HTML text." ], "type": "string" + }, + "userInputActionOption": { + "description": "Optional. How actions with user input form should be handled. If not provided, actions will be returned as links that points merchant to Merchant Center where they can request the action.", + "enum": [ + "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED", + "REDIRECT_TO_MERCHANT_CENTER", + "BUILT_IN_USER_INPUT_ACTIONS" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Actions that require user input are represented only as links that points merchant to Merchant Center where they can request the action. Provides easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`.", + "Returns content and input form definition for each complex action. Your application needs to display this content and input form to the merchant before they can request processing of the action. To start the action, your application needs to call the `triggeraction` method." + ], + "type": "string" } }, "type": "object" @@ -16099,6 +16448,20 @@ "Returns the detail of the issue as a pre-rendered HTML text." ], "type": "string" + }, + "userInputActionOption": { + "description": "Optional. How actions with user input form should be handled. If not provided, actions will be returned as links that points merchant to Merchant Center where they can request the action.", + "enum": [ + "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED", + "REDIRECT_TO_MERCHANT_CENTER", + "BUILT_IN_USER_INPUT_ACTIONS" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Actions that require user input are represented only as links that points merchant to Merchant Center where they can request the action. Provides easier to implement alternative to `BUILT_IN_USER_INPUT_ACTIONS`.", + "Returns content and input form definition for each complex action. Your application needs to display this content and input form to the merchant before they can request processing of the action. To start the action, your application needs to call the `triggeraction` method." + ], + "type": "string" } }, "type": "object" @@ -18039,6 +18402,35 @@ }, "type": "object" }, + "TextWithTooltip": { + "description": "Block of text that may contain a tooltip with more information.", + "id": "TextWithTooltip", + "properties": { + "simpleTooltipValue": { + "description": "Value of the tooltip as a simple text.", + "type": "string" + }, + "simpleValue": { + "description": "Value of the message as a simple text.", + "type": "string" + }, + "tooltipIconStyle": { + "description": "The suggested type of an icon for tooltip, if a tooltip is present.", + "enum": [ + "TOOLTIP_ICON_STYLE_UNSPECIFIED", + "INFO", + "QUESTION" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Used when the tooltip adds additional information to the context, the 'i' can be used as an icon.", + "Used when the tooltip shows helpful information, the '?' can be used as an icon." + ], + "type": "string" + } + }, + "type": "object" + }, "TimePeriod": { "description": "A message that represents a time period.", "id": "TimePeriod", @@ -18174,6 +18566,32 @@ }, "type": "object" }, + "TriggerActionPayload": { + "description": "The payload for the triggered action.", + "id": "TriggerActionPayload", + "properties": { + "actionContext": { + "description": "Required. The context from the selected action. The value is obtained from rendered issues and needs to be sent back to identify the action that is being triggered.", + "type": "string" + }, + "actionInput": { + "$ref": "ActionInput", + "description": "Required. Input provided by the merchant." + } + }, + "type": "object" + }, + "TriggerActionResponse": { + "description": "Response informing about the started action.", + "id": "TriggerActionResponse", + "properties": { + "message": { + "description": "The message for merchant.", + "type": "string" + } + }, + "type": "object" + }, "UndeleteConversionSourceRequest": { "description": "Request message for the UndeleteConversionSource method.", "id": "UndeleteConversionSourceRequest", diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index f8b21382d63..aad5614e884 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -2985,6 +2985,13 @@ type Action struct { // provide instructions, if the specific functionality is not available. BuiltinSimpleAction *BuiltInSimpleAction `json:"builtinSimpleAction,omitempty"` + // BuiltinUserInputAction: Action implemented and performed in (your) + // third-party application. The application needs to show an additional + // content and input form to the merchant as specified for given action. + // They can trigger the action only when they provided all required + // inputs. + BuiltinUserInputAction *BuiltInUserInputAction `json:"builtinUserInputAction,omitempty"` + // ButtonLabel: Label of the action button. ButtonLabel string `json:"buttonLabel,omitempty"` @@ -3031,6 +3038,97 @@ func (s *Action) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ActionFlow: Flow that can be selected for an action. When merchant +// selects a flow, application should open a dialog with more +// information and input form. +type ActionFlow struct { + // DialogButtonLabel: Label for the button to trigger the action from + // the action dialog. For example: "Request review" + DialogButtonLabel string `json:"dialogButtonLabel,omitempty"` + + // DialogCallout: Important message to be highlighted in the request + // dialog. For example: "You can only request a review for disagreeing + // with this issue once. If it's not approved, you'll need to fix the + // issue and wait a few days before you can request another review." + DialogCallout *Callout `json:"dialogCallout,omitempty"` + + // DialogMessage: Message displayed in the request dialog. For example: + // "Make sure you've fixed all your country-specific issues. If not, you + // may have to wait 7 days to request another review". There may be an + // more information to be shown in a tooltip. + DialogMessage *TextWithTooltip `json:"dialogMessage,omitempty"` + + // DialogTitle: Title of the request dialog. For example: "Before you + // request a review" + DialogTitle string `json:"dialogTitle,omitempty"` + + // Id: Not for display but need to be sent back for the selected action + // flow. + Id string `json:"id,omitempty"` + + // Inputs: A list of input fields. + Inputs []*InputField `json:"inputs,omitempty"` + + // Label: Text value describing the intent for the action flow. It can + // be used as an input label if merchant needs to pick one of multiple + // flows. For example: "I disagree with the issue" + Label string `json:"label,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DialogButtonLabel") + // 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. "DialogButtonLabel") 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 *ActionFlow) MarshalJSON() ([]byte, error) { + type NoMethod ActionFlow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ActionInput: Input provided by the merchant. +type ActionInput struct { + // ActionFlowId: Required. Id of the selected action flow. + ActionFlowId string `json:"actionFlowId,omitempty"` + + // InputValues: Required. Values for input fields. + InputValues []*InputValue `json:"inputValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionFlowId") 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. "ActionFlowId") 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 *ActionInput) MarshalJSON() ([]byte, error) { + type NoMethod ActionInput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ActionReason: A single reason why the action is not available. type ActionReason struct { // Action: Optional. An action that needs to be performed to solve the @@ -3591,6 +3689,48 @@ func (s *BuiltInSimpleActionAdditionalContent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BuiltInUserInputAction: Action that is implemented and performed in +// (your) third-party application. The application needs to show an +// additional content and input form to the merchant. They can start the +// action only when they provided all required inputs. The application +// will request processing of the action by calling the triggeraction +// method +// (https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction). +type BuiltInUserInputAction struct { + // ActionContext: Internal details. Not for display but need to be sent + // back when triggering the action. + ActionContext string `json:"actionContext,omitempty"` + + // Flows: Actions may provide multiple different flows. Merchant selects + // one that fits best to their intent. Selecting the flow is the first + // step in user's interaction with the action. It affects what input + // fields will be available and required and also how the request will + // be processed. + Flows []*ActionFlow `json:"flows,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionContext") 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. "ActionContext") 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 *BuiltInUserInputAction) MarshalJSON() ([]byte, error) { + type NoMethod BuiltInUserInputAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type BusinessDayConfig struct { // BusinessDays: Regular business days, such as '"monday"'. May not be // empty. @@ -3733,6 +3873,51 @@ func (s *BuyOnGoogleProgramStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Callout: An important message that should be highlighted. Usually +// displayed as a banner. +type Callout struct { + // FullMessage: A full message that needs to be shown to the merchant. + FullMessage *TextWithTooltip `json:"fullMessage,omitempty"` + + // StyleHint: Can be used to render messages with different severity in + // different styles. Snippets off all types contain important + // information that should be displayed to merchants. + // + // Possible values: + // "CALLOUT_STYLE_HINT_UNSPECIFIED" - Default value. Will never be + // provided by the API. + // "ERROR" - The most important type of information highlighting + // problems, like an unsuccessful outcome of previously requested + // actions. + // "WARNING" - Information warning about pending problems, risks or + // deadlines. + // "INFO" - Default severity for important information like pending + // status of previously requested action or cooldown for re-review. + StyleHint string `json:"styleHint,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FullMessage") 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. "FullMessage") 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 *Callout) MarshalJSON() ([]byte, error) { + type NoMethod Callout + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CaptureOrderRequest: Request message for the CaptureOrder method. type CaptureOrderRequest struct { } @@ -6472,8 +6657,332 @@ type HolidaysHoliday struct { NullFields []string `json:"-"` } -func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) { - type NoMethod HolidaysHoliday +func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) { + type NoMethod HolidaysHoliday + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InputField: Input field that needs to be available to the merchant. +// If the field is marked as required, then a value needs to be provided +// for a successful processing of the request. +type InputField struct { + // CheckboxInput: Input field to provide a boolean value. Corresponds to + // the html input type=checkbox + // (https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). + CheckboxInput *InputFieldCheckboxInput `json:"checkboxInput,omitempty"` + + // ChoiceInput: Input field to select one of the offered choices. + // Corresponds to the html input type=radio + // (https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). + ChoiceInput *InputFieldChoiceInput `json:"choiceInput,omitempty"` + + // Id: Not for display but need to be sent back for the given input + // field. + Id string `json:"id,omitempty"` + + // Label: Input field label. There may be more information to be shown + // in a tooltip. + Label *TextWithTooltip `json:"label,omitempty"` + + // Required: Whether the field is required. The action button needs to + // stay disabled till values for all required fields are provided. + Required bool `json:"required,omitempty"` + + // TextInput: Input field to provide text information. Corresponds to + // the html input type=text + // (https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) + // or html textarea + // (https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). + TextInput *InputFieldTextInput `json:"textInput,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CheckboxInput") 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. "CheckboxInput") 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 *InputField) MarshalJSON() ([]byte, error) { + type NoMethod InputField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InputFieldCheckboxInput: Checkbox input allows merchants to provide a +// boolean value. Corresponds to the html input type=checkbox +// (https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). +// If merchant checks the box, the input value for the field is `true`, +// otherwise it is `false`. This type of input is often used as a +// confirmation that the merchant completed required steps before they +// are allowed to start the action. In such a case, the input field is +// marked as required and the button to trigger the action should stay +// disabled until the merchant checks the box. +type InputFieldCheckboxInput struct { +} + +// InputFieldChoiceInput: Choice input allows merchants to select one of +// the offered choices. Some choices may be linked to additional input +// fields that should be displayed under or next to the choice option. +// The value for the additional input field needs to be provided only +// when the specific choice is selected by the merchant. For example, +// additional input field can be hidden or disabled until the merchant +// selects the specific choice. +type InputFieldChoiceInput struct { + // Options: A list of choices. Only one option can be selected. + Options []*InputFieldChoiceInputChoiceInputOption `json:"options,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Options") 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. "Options") 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 *InputFieldChoiceInput) MarshalJSON() ([]byte, error) { + type NoMethod InputFieldChoiceInput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InputFieldChoiceInputChoiceInputOption: A choice that merchant can +// select. +type InputFieldChoiceInputChoiceInputOption struct { + // AdditionalInput: Input that should be displayed when this option is + // selected. The additional input will not contain a `ChoiceInput`. + AdditionalInput *InputField `json:"additionalInput,omitempty"` + + // Id: Not for display but need to be sent back for the selected choice + // option. + Id string `json:"id,omitempty"` + + // Label: Short description of the choice option. There may be more + // information to be shown as a tooltip. + Label *TextWithTooltip `json:"label,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalInput") 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. "AdditionalInput") 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 *InputFieldChoiceInputChoiceInputOption) MarshalJSON() ([]byte, error) { + type NoMethod InputFieldChoiceInputChoiceInputOption + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InputFieldTextInput: Text input allows merchants to provide a text +// value. +type InputFieldTextInput struct { + // AdditionalInfo: Additional info regarding the field to be displayed + // to merchant. For example, warning to not include personal + // identifiable information. There may be more information to be shown + // in a tooltip. + AdditionalInfo *TextWithTooltip `json:"additionalInfo,omitempty"` + + // AriaLabel: Text to be used as the aria label + // (https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the input. + AriaLabel string `json:"ariaLabel,omitempty"` + + // FormatInfo: Information about the required format. If present, it + // should be shown close to the input field to help merchants to provide + // a correct value. For example: "VAT numbers should be in a format + // similar to SK9999999999" + FormatInfo string `json:"formatInfo,omitempty"` + + // Type: Type of the text input + // + // Possible values: + // "TEXT_INPUT_TYPE_UNSPECIFIED" - Default value. Will never be + // provided by the API. + // "GENERIC_SHORT_TEXT" - Used when a short text is expected. The + // field can be rendered as a [text + // field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.h + // tml#input.text). + // "GENERIC_LONG_TEXT" - Used when a longer text is expected. The + // field should be rendered as a + // [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea + // .html#textarea). + Type string `json:"type,omitempty"` + + // 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. "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 + // 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 *InputFieldTextInput) MarshalJSON() ([]byte, error) { + type NoMethod InputFieldTextInput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InputValue: Input provided by the merchant for input field. +type InputValue struct { + // CheckboxInputValue: Value for checkbox input field. + CheckboxInputValue *InputValueCheckboxInputValue `json:"checkboxInputValue,omitempty"` + + // ChoiceInputValue: Value for choice input field. + ChoiceInputValue *InputValueChoiceInputValue `json:"choiceInputValue,omitempty"` + + // InputFieldId: Required. Id of the corresponding input field. + InputFieldId string `json:"inputFieldId,omitempty"` + + // TextInputValue: Value for text input field. + TextInputValue *InputValueTextInputValue `json:"textInputValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CheckboxInputValue") + // 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. "CheckboxInputValue") 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 *InputValue) MarshalJSON() ([]byte, error) { + type NoMethod InputValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InputValueCheckboxInputValue: Value for checkbox input field. +type InputValueCheckboxInputValue struct { + // Value: Required. True if the merchant checked the box field. False + // otherwise. + Value bool `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") 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. "Value") 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 *InputValueCheckboxInputValue) MarshalJSON() ([]byte, error) { + type NoMethod InputValueCheckboxInputValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InputValueChoiceInputValue: Value for choice input field. +type InputValueChoiceInputValue struct { + // ChoiceInputOptionId: Required. Id of the option that was selected by + // the merchant. + ChoiceInputOptionId string `json:"choiceInputOptionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChoiceInputOptionId") + // 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. "ChoiceInputOptionId") 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 *InputValueChoiceInputValue) MarshalJSON() ([]byte, error) { + type NoMethod InputValueChoiceInputValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InputValueTextInputValue: Value for text input field. +type InputValueTextInputValue struct { + // Value: Required. Text provided by the merchant. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") 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. "Value") 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 *InputValueTextInputValue) MarshalJSON() ([]byte, error) { + type NoMethod InputValueTextInputValue raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -14132,6 +14641,14 @@ type Product struct { // Acceptable values are: - "api" - "crawl" - "feed" Source string `json:"source,omitempty"` + // StructuredDescription: Structured description, for algorithmically + // (AI)-generated descriptions. + StructuredDescription *ProductStructuredDescription `json:"structuredDescription,omitempty"` + + // StructuredTitle: Structured title, for algorithmically (AI)-generated + // titles. + StructuredTitle *ProductStructuredTitle `json:"structuredTitle,omitempty"` + // SubscriptionCost: Number of periods (months or years) and amount of // payment per period for an item with an associated subscription // contract. @@ -15080,6 +15597,77 @@ func (s *ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ProductStructuredDescription: Structured description, for +// algorithmically (AI)-generated descriptions. See description +// (https://support.google.com/merchants/answer/6324468#When_to_use) for +// more information. +type ProductStructuredDescription struct { + // Content: Required. The description text. Maximum length is 5000 + // characters. + Content string `json:"content,omitempty"` + + // DigitalSourceType: Optional. The digital source type. Acceptable + // values are: - "trained_algorithmic_media" - "default" + DigitalSourceType string `json:"digitalSourceType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 *ProductStructuredDescription) MarshalJSON() ([]byte, error) { + type NoMethod ProductStructuredDescription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ProductStructuredTitle: Structured title, for algorithmically +// (AI)-generated titles. See title +// (https://support.google.com/merchants/answer/6324415#Whentouse) for +// more information. +type ProductStructuredTitle struct { + // Content: Required. The title text. Maximum length is 150 characters. + Content string `json:"content,omitempty"` + + // DigitalSourceType: Optional. The digital source type. Acceptable + // values are: - "trained_algorithmic_media" - "default" + DigitalSourceType string `json:"digitalSourceType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 *ProductStructuredTitle) MarshalJSON() ([]byte, error) { + type NoMethod ProductStructuredTitle + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ProductSubscriptionCost struct { // Amount: The amount the buyer has to pay per subscription period. Amount *Price `json:"amount,omitempty"` @@ -17103,6 +17691,25 @@ type RenderAccountIssuesRequestPayload struct { // pre-rendered HTML text. ContentOption string `json:"contentOption,omitempty"` + // UserInputActionOption: Optional. How actions with user input form + // should be handled. If not provided, actions will be returned as links + // that points merchant to Merchant Center where they can request the + // action. + // + // Possible values: + // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. + // Will never be provided by the API. + // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are + // represented only as links that points merchant to Merchant Center + // where they can request the action. Provides easier to implement + // alternative to `BUILT_IN_USER_INPUT_ACTIONS`. + // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form + // definition for each complex action. Your application needs to display + // this content and input form to the merchant before they can request + // processing of the action. To start the action, your application needs + // to call the `triggeraction` method. + UserInputActionOption string `json:"userInputActionOption,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentOption") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -17186,6 +17793,25 @@ type RenderProductIssuesRequestPayload struct { // pre-rendered HTML text. ContentOption string `json:"contentOption,omitempty"` + // UserInputActionOption: Optional. How actions with user input form + // should be handled. If not provided, actions will be returned as links + // that points merchant to Merchant Center where they can request the + // action. + // + // Possible values: + // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. + // Will never be provided by the API. + // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are + // represented only as links that points merchant to Merchant Center + // where they can request the action. Provides easier to implement + // alternative to `BUILT_IN_USER_INPUT_ACTIONS`. + // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form + // definition for each complex action. Your application needs to display + // this content and input form to the merchant before they can request + // processing of the action. To start the action, your application needs + // to call the `triggeraction` method. + UserInputActionOption string `json:"userInputActionOption,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentOption") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -20370,6 +20996,51 @@ func (s *TestOrderPickupDetailsPickupPerson) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TextWithTooltip: Block of text that may contain a tooltip with more +// information. +type TextWithTooltip struct { + // SimpleTooltipValue: Value of the tooltip as a simple text. + SimpleTooltipValue string `json:"simpleTooltipValue,omitempty"` + + // SimpleValue: Value of the message as a simple text. + SimpleValue string `json:"simpleValue,omitempty"` + + // TooltipIconStyle: The suggested type of an icon for tooltip, if a + // tooltip is present. + // + // Possible values: + // "TOOLTIP_ICON_STYLE_UNSPECIFIED" - Default value. Will never be + // provided by the API. + // "INFO" - Used when the tooltip adds additional information to the + // context, the 'i' can be used as an icon. + // "QUESTION" - Used when the tooltip shows helpful information, the + // '?' can be used as an icon. + TooltipIconStyle string `json:"tooltipIconStyle,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SimpleTooltipValue") + // 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. "SimpleTooltipValue") 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 *TextWithTooltip) MarshalJSON() ([]byte, error) { + type NoMethod TextWithTooltip + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TimePeriod: A message that represents a time period. type TimePeriod struct { // EndTime: The ending timestamp. @@ -20637,6 +21308,71 @@ func (s *TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TriggerActionPayload: The payload for the triggered action. +type TriggerActionPayload struct { + // ActionContext: Required. The context from the selected action. The + // value is obtained from rendered issues and needs to be sent back to + // identify the action that is being triggered. + ActionContext string `json:"actionContext,omitempty"` + + // ActionInput: Required. Input provided by the merchant. + ActionInput *ActionInput `json:"actionInput,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionContext") 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. "ActionContext") 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 *TriggerActionPayload) MarshalJSON() ([]byte, error) { + type NoMethod TriggerActionPayload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TriggerActionResponse: Response informing about the started action. +type TriggerActionResponse struct { + // Message: The message for merchant. + Message string `json:"message,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Message") 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. "Message") 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 *TriggerActionResponse) MarshalJSON() ([]byte, error) { + type NoMethod TriggerActionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UndeleteConversionSourceRequest: Request message for the // UndeleteConversionSource method. type UndeleteConversionSourceRequest struct { @@ -33670,6 +34406,170 @@ func (c *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption } +// method id "content.merchantsupport.triggeraction": + +type MerchantsupportTriggeractionCall struct { + s *APIService + merchantId int64 + triggeractionpayload *TriggerActionPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Triggeraction: Start an action. The action can be requested by +// merchants in third-party application. Before merchants can request +// the action, the third-party application needs to show them action +// specific content and display a user input form. The action can be +// successfully started only once all `required` inputs are provided. If +// any `required` input is missing, or invalid value was provided, the +// service will return 400 error. Validation errors will contain Ids for +// all problematic field together with translated, human readable error +// messages that can be shown to the user. +// +// - merchantId: The ID of the merchant's account. +func (r *MerchantsupportService) Triggeraction(merchantId int64, triggeractionpayload *TriggerActionPayload) *MerchantsupportTriggeractionCall { + c := &MerchantsupportTriggeractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.triggeractionpayload = triggeractionpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": Language +// code IETF BCP 47 syntax (https://tools.ietf.org/html/bcp47) used to +// localize the response. If not set, the result will be in default +// language `en-US`. +func (c *MerchantsupportTriggeractionCall) LanguageCode(languageCode string) *MerchantsupportTriggeractionCall { + c.urlParams_.Set("languageCode", languageCode) + 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 *MerchantsupportTriggeractionCall) Fields(s ...googleapi.Field) *MerchantsupportTriggeractionCall { + 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 *MerchantsupportTriggeractionCall) Context(ctx context.Context) *MerchantsupportTriggeractionCall { + 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 *MerchantsupportTriggeractionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MerchantsupportTriggeractionCall) 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.triggeractionpayload) + 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, "{merchantId}/merchantsupport/triggeraction") + 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{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.merchantsupport.triggeraction" call. +// Exactly one of *TriggerActionResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TriggerActionResponse.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 *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*TriggerActionResponse, 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 := &TriggerActionResponse{ + 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": "Start an action. The action can be requested by merchants in third-party application. Before merchants can request the action, the third-party application needs to show them action specific content and display a user input form. The action can be successfully started only once all `required` inputs are provided. If any `required` input is missing, or invalid value was provided, the service will return 400 error. Validation errors will contain Ids for all problematic field together with translated, human readable error messages that can be shown to the user.", + // "flatPath": "{merchantId}/merchantsupport/triggeraction", + // "httpMethod": "POST", + // "id": "content.merchantsupport.triggeraction", + // "parameterOrder": [ + // "merchantId" + // ], + // "parameters": { + // "languageCode": { + // "description": "Optional. Language code [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) used to localize the response. If not set, the result will be in default language `en-US`.", + // "location": "query", + // "type": "string" + // }, + // "merchantId": { + // "description": "Required. The ID of the merchant's account.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{merchantId}/merchantsupport/triggeraction", + // "request": { + // "$ref": "TriggerActionPayload" + // }, + // "response": { + // "$ref": "TriggerActionResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/content" + // ] + // } + +} + // method id "content.orderinvoices.createchargeinvoice": type OrderinvoicesCreatechargeinvoiceCall struct { diff --git a/dataportability/v1/dataportability-api.json b/dataportability/v1/dataportability-api.json index 6992653e18a..a3787b60d2c 100644 --- a/dataportability/v1/dataportability-api.json +++ b/dataportability/v1/dataportability-api.json @@ -59,9 +59,6 @@ "https://www.googleapis.com/auth/dataportability.maps.photos_videos": { "description": "Move a copy of the photos and videos you posted on Maps." }, - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback": { - "description": "Move a copy of feedback you gave after completing trips using Maps directions." - }, "https://www.googleapis.com/auth/dataportability.maps.questions_answers": { "description": "Move a copy of the questions and answers you posted on Maps." }, @@ -340,7 +337,6 @@ "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -432,7 +428,6 @@ "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -518,7 +513,6 @@ "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -604,7 +598,6 @@ "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -655,7 +648,7 @@ } } }, - "revision": "20240319", + "revision": "20240403", "rootUrl": "https://dataportability.googleapis.com/", "schemas": { "Empty": { diff --git a/dataportability/v1/dataportability-gen.go b/dataportability/v1/dataportability-gen.go index dcd9cb120d5..de7924f5500 100644 --- a/dataportability/v1/dataportability-gen.go +++ b/dataportability/v1/dataportability-gen.go @@ -162,10 +162,6 @@ const ( // Move a copy of the photos and videos you posted on Maps. DataportabilityMapsPhotosVideosScope = "https://www.googleapis.com/auth/dataportability.maps.photos_videos" - // Move a copy of feedback you gave after completing trips using Maps - // directions. - DataportabilityMapsPostTripFeedbackScope = "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback" - // Move a copy of the questions and answers you posted on Maps. DataportabilityMapsQuestionsAnswersScope = "https://www.googleapis.com/auth/dataportability.maps.questions_answers" @@ -336,7 +332,6 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -796,7 +791,6 @@ func (c *ArchiveJobsGetPortabilityArchiveStateCall) Do(opts ...googleapi.CallOpt // "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", // "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", // "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - // "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", // "https://www.googleapis.com/auth/dataportability.maps.questions_answers", // "https://www.googleapis.com/auth/dataportability.maps.reviews", // "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -1004,7 +998,6 @@ func (c *ArchiveJobsRetryCall) Do(opts ...googleapi.CallOption) (*RetryPortabili // "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", // "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", // "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - // "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", // "https://www.googleapis.com/auth/dataportability.maps.questions_answers", // "https://www.googleapis.com/auth/dataportability.maps.reviews", // "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -1198,7 +1191,6 @@ func (c *AuthorizationResetCall) Do(opts ...googleapi.CallOption) (*Empty, error // "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", // "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", // "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - // "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", // "https://www.googleapis.com/auth/dataportability.maps.questions_answers", // "https://www.googleapis.com/auth/dataportability.maps.reviews", // "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -1388,7 +1380,6 @@ func (c *PortabilityArchiveInitiateCall) Do(opts ...googleapi.CallOption) (*Init // "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", // "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", // "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - // "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", // "https://www.googleapis.com/auth/dataportability.maps.questions_answers", // "https://www.googleapis.com/auth/dataportability.maps.reviews", // "https://www.googleapis.com/auth/dataportability.maps.starred_places", diff --git a/dataportability/v1beta/dataportability-api.json b/dataportability/v1beta/dataportability-api.json index 230425e6c6f..11508cd7790 100644 --- a/dataportability/v1beta/dataportability-api.json +++ b/dataportability/v1beta/dataportability-api.json @@ -59,9 +59,6 @@ "https://www.googleapis.com/auth/dataportability.maps.photos_videos": { "description": "Move a copy of the photos and videos you posted on Maps." }, - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback": { - "description": "Move a copy of feedback you gave after completing trips using Maps directions." - }, "https://www.googleapis.com/auth/dataportability.maps.questions_answers": { "description": "Move a copy of the questions and answers you posted on Maps." }, @@ -340,7 +337,6 @@ "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -432,7 +428,6 @@ "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -518,7 +513,6 @@ "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -604,7 +598,6 @@ "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -655,7 +648,7 @@ } } }, - "revision": "20240319", + "revision": "20240403", "rootUrl": "https://dataportability.googleapis.com/", "schemas": { "Empty": { diff --git a/dataportability/v1beta/dataportability-gen.go b/dataportability/v1beta/dataportability-gen.go index 6c5b136cbce..2d0d0048578 100644 --- a/dataportability/v1beta/dataportability-gen.go +++ b/dataportability/v1beta/dataportability-gen.go @@ -162,10 +162,6 @@ const ( // Move a copy of the photos and videos you posted on Maps. DataportabilityMapsPhotosVideosScope = "https://www.googleapis.com/auth/dataportability.maps.photos_videos" - // Move a copy of feedback you gave after completing trips using Maps - // directions. - DataportabilityMapsPostTripFeedbackScope = "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback" - // Move a copy of the questions and answers you posted on Maps. DataportabilityMapsQuestionsAnswersScope = "https://www.googleapis.com/auth/dataportability.maps.questions_answers" @@ -336,7 +332,6 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", "https://www.googleapis.com/auth/dataportability.maps.questions_answers", "https://www.googleapis.com/auth/dataportability.maps.reviews", "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -796,7 +791,6 @@ func (c *ArchiveJobsGetPortabilityArchiveStateCall) Do(opts ...googleapi.CallOpt // "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", // "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", // "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - // "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", // "https://www.googleapis.com/auth/dataportability.maps.questions_answers", // "https://www.googleapis.com/auth/dataportability.maps.reviews", // "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -1004,7 +998,6 @@ func (c *ArchiveJobsRetryCall) Do(opts ...googleapi.CallOption) (*RetryPortabili // "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", // "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", // "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - // "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", // "https://www.googleapis.com/auth/dataportability.maps.questions_answers", // "https://www.googleapis.com/auth/dataportability.maps.reviews", // "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -1198,7 +1191,6 @@ func (c *AuthorizationResetCall) Do(opts ...googleapi.CallOption) (*Empty, error // "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", // "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", // "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - // "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", // "https://www.googleapis.com/auth/dataportability.maps.questions_answers", // "https://www.googleapis.com/auth/dataportability.maps.reviews", // "https://www.googleapis.com/auth/dataportability.maps.starred_places", @@ -1388,7 +1380,6 @@ func (c *PortabilityArchiveInitiateCall) Do(opts ...googleapi.CallOption) (*Init // "https://www.googleapis.com/auth/dataportability.maps.factual_contributions", // "https://www.googleapis.com/auth/dataportability.maps.offering_contributions", // "https://www.googleapis.com/auth/dataportability.maps.photos_videos", - // "https://www.googleapis.com/auth/dataportability.maps.post_trip_feedback", // "https://www.googleapis.com/auth/dataportability.maps.questions_answers", // "https://www.googleapis.com/auth/dataportability.maps.reviews", // "https://www.googleapis.com/auth/dataportability.maps.starred_places", diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index 9b05d77601e..9541ae408a0 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -9267,7 +9267,7 @@ } } }, - "revision": "20240314", + "revision": "20240404", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -14096,6 +14096,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -14179,6 +14180,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -14287,6 +14289,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -14370,6 +14373,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -14479,6 +14483,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -14562,6 +14567,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -14672,6 +14678,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -14755,6 +14762,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -15716,6 +15724,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -15799,6 +15808,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -16625,6 +16635,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -16708,6 +16719,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index 3d2f39464ea..527f44657f0 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -8301,6 +8301,7 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -8445,6 +8446,7 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -8571,6 +8573,7 @@ type ExchangeReviewStatus struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -8696,6 +8699,7 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -9941,6 +9945,7 @@ type GuaranteedOrder struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -10892,6 +10897,7 @@ type InventorySource struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index 571045312bc..f3023f7f5f9 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -9222,7 +9222,7 @@ } } }, - "revision": "20240314", + "revision": "20240404", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -10042,6 +10042,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -10125,6 +10126,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -14808,6 +14810,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -14891,6 +14894,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -14999,6 +15003,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -15082,6 +15087,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -15191,6 +15197,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -15274,6 +15281,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -15384,6 +15392,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -15467,6 +15476,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -16428,6 +16438,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -16511,6 +16522,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", @@ -17315,6 +17327,7 @@ "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", "EXCHANGE_HIVESTACK", + "EXCHANGE_DRAX", "EXCHANGE_APPLOVIN_GBID", "EXCHANGE_FYBER_GBID", "EXCHANGE_UNITY_GBID", @@ -17398,6 +17411,7 @@ "Connatix.", "Reset Digital.", "Hivestack.", + "Drax.", "AppLovin MAX.", "DT Fairbid.", "Unity LevelPlay.", diff --git a/displayvideo/v3/displayvideo-gen.go b/displayvideo/v3/displayvideo-gen.go index c0bfdd57b61..91b709e2aa0 100644 --- a/displayvideo/v3/displayvideo-gen.go +++ b/displayvideo/v3/displayvideo-gen.go @@ -1888,6 +1888,7 @@ type AlgorithmRulesComparisonValue struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -9237,6 +9238,7 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -9381,6 +9383,7 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -9507,6 +9510,7 @@ type ExchangeReviewStatus struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -9632,6 +9636,7 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -10877,6 +10882,7 @@ type GuaranteedOrder struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. @@ -11818,6 +11824,7 @@ type InventorySource struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_DRAX" - Drax. // "EXCHANGE_APPLOVIN_GBID" - AppLovin MAX. // "EXCHANGE_FYBER_GBID" - DT Fairbid. // "EXCHANGE_UNITY_GBID" - Unity LevelPlay. diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 7aa38d9e678..8bd4bdf6c9a 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -584,6 +584,51 @@ } } }, + "connections": { + "methods": { + "search": { + "description": "Searches for Connections in a parent.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/connections:search", + "httpMethod": "GET", + "id": "dlp.organizations.locations.connections.search", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Number of results per page, max 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent name, typically an organization, without location. For example: \"organizations/12345678\".", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/connections:search", + "response": { + "$ref": "GooglePrivacyDlpV2SearchConnectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "deidentifyTemplates": { "methods": { "create": { @@ -1526,6 +1571,31 @@ }, "tableDataProfiles": { "methods": { + "delete": { + "description": "Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", + "httpMethod": "DELETE", + "id": "dlp.organizations.locations.tableDataProfiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the table data profile.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a table data profile.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", @@ -2650,6 +2720,198 @@ } } }, + "connections": { + "methods": { + "create": { + "description": "Create a Connection to an external data source.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", + "httpMethod": "POST", + "id": "dlp.projects.locations.connections.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name in the format: \"projects/{project}/locations/{location}\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/connections", + "request": { + "$ref": "GooglePrivacyDlpV2CreateConnectionRequest" + }, + "response": { + "$ref": "GooglePrivacyDlpV2Connection" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a Connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + "httpMethod": "DELETE", + "id": "dlp.projects.locations.connections.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the Connection to be deleted, in the format: \"projects/{project}/locations/{location}/connections/{connection}\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a Connection by name.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + "httpMethod": "GET", + "id": "dlp.projects.locations.connections.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name in the format: \"projects/{project}/locations/{location}/connections/{connection}\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2Connection" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Connections in a parent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", + "httpMethod": "GET", + "id": "dlp.projects.locations.connections.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Number of results per page, max 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent name, for example: \"projects/project-id/locations/global\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/connections", + "response": { + "$ref": "GooglePrivacyDlpV2ListConnectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update a Connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + "httpMethod": "PATCH", + "id": "dlp.projects.locations.connections.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name in the format: \"projects/{project}/locations/{location}/connections/{connection}\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GooglePrivacyDlpV2UpdateConnectionRequest" + }, + "response": { + "$ref": "GooglePrivacyDlpV2Connection" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "search": { + "description": "Searches for Connections in a parent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections:search", + "httpMethod": "GET", + "id": "dlp.projects.locations.connections.search", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Number of results per page, max 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent name, typically an organization, without location. For example: \"organizations/12345678\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/connections:search", + "response": { + "$ref": "GooglePrivacyDlpV2SearchConnectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "content": { "methods": { "deidentify": { @@ -3930,6 +4192,31 @@ }, "tableDataProfiles": { "methods": { + "delete": { + "description": "Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", + "httpMethod": "DELETE", + "id": "dlp.projects.locations.tableDataProfiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the table data profile.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a table data profile.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", @@ -4164,7 +4451,7 @@ } } }, - "revision": "20240317", + "revision": "20240331", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -4231,6 +4518,12 @@ "properties": {}, "type": "object" }, + "GooglePrivacyDlpV2AllOtherDatabaseResources": { + "description": "Match database resources not covered by any other filter.", + "id": "GooglePrivacyDlpV2AllOtherDatabaseResources", + "properties": {}, + "type": "object" + }, "GooglePrivacyDlpV2AllText": { "description": "Apply to all text.", "id": "GooglePrivacyDlpV2AllText", @@ -4730,6 +5023,73 @@ }, "type": "object" }, + "GooglePrivacyDlpV2CloudSqlDiscoveryTarget": { + "description": "Target used to match against for discovery with Cloud SQL tables.", + "id": "GooglePrivacyDlpV2CloudSqlDiscoveryTarget", + "properties": { + "conditions": { + "$ref": "GooglePrivacyDlpV2DiscoveryCloudSqlConditions", + "description": "In addition to matching the filter, these conditions must be true before a profile is generated." + }, + "disabled": { + "$ref": "GooglePrivacyDlpV2Disabled", + "description": "Disable profiling for database resources that match this filter." + }, + "filter": { + "$ref": "GooglePrivacyDlpV2DiscoveryCloudSqlFilter", + "description": "Required. The tables the discovery cadence applies to. The first target with a matching filter will be the one to apply to a table." + }, + "generationCadence": { + "$ref": "GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence", + "description": "How often and when to update profiles. New tables that match both the filter and conditions are scanned as quickly as possible depending on system capacity." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2CloudSqlIamCredential": { + "description": "Use IAM auth to connect. This requires the Cloud SQL IAM feature to be enabled on the instance, which is not the default for Cloud SQL. See https://cloud.google.com/sql/docs/postgres/authentication and https://cloud.google.com/sql/docs/mysql/authentication.", + "id": "GooglePrivacyDlpV2CloudSqlIamCredential", + "properties": {}, + "type": "object" + }, + "GooglePrivacyDlpV2CloudSqlProperties": { + "description": "Cloud SQL connection properties.", + "id": "GooglePrivacyDlpV2CloudSqlProperties", + "properties": { + "cloudSqlIam": { + "$ref": "GooglePrivacyDlpV2CloudSqlIamCredential", + "description": "Built-in IAM authentication (must be configured in Cloud SQL)." + }, + "connectionName": { + "description": "Optional. Immutable. The Cloud SQL instance for which the connection is defined. Only one connection per instance is allowed. This can only be set at creation time, and cannot be updated. It is an error to use a connection_name from different project or region than the one that holds the connection. For example, a Connection resource for Cloud SQL connection_name \"project-id:us-central1:sql-instance\" must be created under the parent \"projects/project-id/locations/us-central1\"", + "type": "string" + }, + "databaseEngine": { + "description": "Required. The database engine used by the Cloud SQL instance that this connection configures.", + "enum": [ + "DATABASE_ENGINE_UNKNOWN", + "DATABASE_ENGINE_MYSQL", + "DATABASE_ENGINE_POSTGRES" + ], + "enumDescriptions": [ + "An engine that is not currently supported by SDP.", + "Cloud SQL for MySQL instance.", + "Cloud SQL for Postgres instance." + ], + "type": "string" + }, + "maxConnections": { + "description": "Required. DLP will limit its connections to max_connections. Must be 2 or greater.", + "format": "int32", + "type": "integer" + }, + "usernamePassword": { + "$ref": "GooglePrivacyDlpV2SecretManagerCredential", + "description": "A username and password stored in Secret Manager." + } + }, + "type": "object" + }, "GooglePrivacyDlpV2CloudStorageFileSet": { "description": "Message representing a set of files in Cloud Storage.", "id": "GooglePrivacyDlpV2CloudStorageFileSet", @@ -5103,6 +5463,46 @@ }, "type": "object" }, + "GooglePrivacyDlpV2Connection": { + "description": "A data connection to allow DLP to profile data in locations that require additional configuration.", + "id": "GooglePrivacyDlpV2Connection", + "properties": { + "cloudSql": { + "$ref": "GooglePrivacyDlpV2CloudSqlProperties", + "description": "Connect to a Cloud SQL instance." + }, + "errors": { + "description": "Output only. Set if status == ERROR, to provide additional details. Will store the last 10 errors sorted with the most recent first.", + "items": { + "$ref": "GooglePrivacyDlpV2Error" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Output only. Name of the connection: projects/{project}/locations/{location}/connections/{name}.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Required. The connection's state in its lifecycle.", + "enum": [ + "CONNECTION_STATE_UNSPECIFIED", + "MISSING_CREDENTIALS", + "AVAILABLE", + "ERROR" + ], + "enumDescriptions": [ + "Unused", + "DLP automatically created this connection during an initial scan, and it is awaiting full configuration by a user.", + "A configured connection that has not encountered any errors.", + "A configured connection that encountered errors during its last use. It will not be used again until it is set to AVAILABLE. If the resolution requires external action, then a request to set the status to AVAILABLE will mark this connection for use. Otherwise, any changes to the connection properties will automatically mark it as AVAILABLE." + ], + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2Container": { "description": "Represents a container that may contain DLP findings. Examples of a container include a file, table, or database record.", "id": "GooglePrivacyDlpV2Container", @@ -5194,6 +5594,17 @@ }, "type": "object" }, + "GooglePrivacyDlpV2CreateConnectionRequest": { + "description": "Request message for CreateConnection.", + "id": "GooglePrivacyDlpV2CreateConnectionRequest", + "properties": { + "connection": { + "$ref": "GooglePrivacyDlpV2Connection", + "description": "Required. The connection resource." + } + }, + "type": "object" + }, "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest": { "description": "Request message for CreateDeidentifyTemplate.", "id": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest", @@ -5653,6 +6064,69 @@ }, "type": "object" }, + "GooglePrivacyDlpV2DatabaseResourceCollection": { + "description": "Match database resources using regex filters. Examples of database resources are tables, views, and stored procedures.", + "id": "GooglePrivacyDlpV2DatabaseResourceCollection", + "properties": { + "includeRegexes": { + "$ref": "GooglePrivacyDlpV2DatabaseResourceRegexes", + "description": "A collection of regular expressions to match a database resource against." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DatabaseResourceReference": { + "description": "Identifies a single database resource, like a table within a database.", + "id": "GooglePrivacyDlpV2DatabaseResourceReference", + "properties": { + "instance": { + "description": "Required. The instance where this resource is located. For example: Cloud SQL's instance id.", + "type": "string" + }, + "projectId": { + "description": "Required. If within a project-level config, then this must match the config's project id.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DatabaseResourceRegex": { + "description": "A pattern to match against one or more database resources. At least one pattern must be specified. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.", + "id": "GooglePrivacyDlpV2DatabaseResourceRegex", + "properties": { + "databaseRegex": { + "description": "Regex to test the database name against. If empty, all databases match.", + "type": "string" + }, + "databaseResourceNameRegex": { + "description": "Regex to test the database resource's name against. An example of a database resource name is a table's name. Other database resource names like view names could be included in the future. If empty, all database resources match.", + "type": "string" + }, + "instanceRegex": { + "description": "Regex to test the instance name against. If empty, all instances match.", + "type": "string" + }, + "projectIdRegex": { + "description": "For organizations, if unset, will match all projects. Has no effect for Data Profile configurations created within a project.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DatabaseResourceRegexes": { + "description": "A collection of regular expressions to determine what database resources to match against.", + "id": "GooglePrivacyDlpV2DatabaseResourceRegexes", + "properties": { + "patterns": { + "description": "A group of regular expression patterns to match against one or more database resources. Maximum of 100 entries. The sum of all regular expression's length can't exceed 10 KiB.", + "items": { + "$ref": "GooglePrivacyDlpV2DatabaseResourceRegex" + }, + "type": "array" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2DatastoreKey": { "description": "Record key for a finding in Cloud Datastore.", "id": "GooglePrivacyDlpV2DatastoreKey", @@ -6114,6 +6588,95 @@ }, "type": "object" }, + "GooglePrivacyDlpV2DiscoveryCloudSqlConditions": { + "description": "Requirements that must be true before a table is profiled for the first time.", + "id": "GooglePrivacyDlpV2DiscoveryCloudSqlConditions", + "properties": { + "databaseEngines": { + "description": "Optional. Database engines that should be profiled. Optional. Defaults to ALL_SUPPORTED_DATABASE_ENGINES if unspecified.", + "items": { + "enum": [ + "DATABASE_ENGINE_UNSPECIFIED", + "ALL_SUPPORTED_DATABASE_ENGINES", + "MYSQL", + "POSTGRES" + ], + "enumDescriptions": [ + "Unused.", + "Include all supported database engines.", + "MySql database.", + "PostGres database." + ], + "type": "string" + }, + "type": "array" + }, + "types": { + "description": "Data profiles will only be generated for the database resource types specified in this field. If not specified, defaults to [DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES].", + "items": { + "enum": [ + "DATABASE_RESOURCE_TYPE_UNSPECIFIED", + "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES", + "DATABASE_RESOURCE_TYPE_TABLE" + ], + "enumDescriptions": [ + "Unused.", + "Includes database resource types that become supported at a later time.", + "Tables." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryCloudSqlFilter": { + "description": "Determines what tables will have profiles generated within an organization or project. Includes the ability to filter by regular expression patterns on project ID, location, instance, database, and database resource name.", + "id": "GooglePrivacyDlpV2DiscoveryCloudSqlFilter", + "properties": { + "collection": { + "$ref": "GooglePrivacyDlpV2DatabaseResourceCollection", + "description": "A specific set of database resources for this filter to apply to." + }, + "databaseResourceReference": { + "$ref": "GooglePrivacyDlpV2DatabaseResourceReference", + "description": "The database resource to scan. Targets including this can only include one target (the target with this database resource reference)." + }, + "others": { + "$ref": "GooglePrivacyDlpV2AllOtherDatabaseResources", + "description": "Catch-all. This should always be the last target in the list because anything above it will apply first. Should only appear once in a configuration. If none is specified, a default one will be added automatically." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence": { + "description": "How often existing tables should have their profiles refreshed. New tables are scanned as quickly as possible depending on system capacity.", + "id": "GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence", + "properties": { + "refreshFrequency": { + "description": "Data changes (non-schema changes) in Cloud SQL tables can't trigger reprofiling. If you set this field, profiles are refreshed at this frequency regardless of whether the underlying tables have changes. Defaults to never.", + "enum": [ + "UPDATE_FREQUENCY_UNSPECIFIED", + "UPDATE_FREQUENCY_NEVER", + "UPDATE_FREQUENCY_DAILY", + "UPDATE_FREQUENCY_MONTHLY" + ], + "enumDescriptions": [ + "Unspecified.", + "After the data profile is created, it will never be updated.", + "The data profile can be updated up to once every 24 hours.", + "The data profile can be updated up to once every 30 days. Default." + ], + "type": "string" + }, + "schemaModifiedCadence": { + "$ref": "GooglePrivacyDlpV2SchemaModifiedCadence", + "description": "When to reprofile if the schema has changed." + } + }, + "type": "object" + }, "GooglePrivacyDlpV2DiscoveryConfig": { "description": "Configuration for discovery to scan resources for profile generation. Only one discovery configuration may exist per organization, folder, or project. The generated data profiles are retained according to the [data retention policy] (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention).", "id": "GooglePrivacyDlpV2DiscoveryConfig", @@ -6311,6 +6874,10 @@ "bigQueryTarget": { "$ref": "GooglePrivacyDlpV2BigQueryDiscoveryTarget", "description": "BigQuery target for Discovery. The first target to match a table will be the one applied." + }, + "cloudSqlTarget": { + "$ref": "GooglePrivacyDlpV2CloudSqlDiscoveryTarget", + "description": "Cloud SQL target for Discovery. The first target to match a table will be the one applied." } }, "type": "object" @@ -7533,7 +8100,7 @@ "type": "object" }, "GooglePrivacyDlpV2JobTrigger": { - "description": "Contains a configuration to make dlp api calls on a repeating basis. See https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers to learn more.", + "description": "Contains a configuration to make api calls on a repeating basis. See https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers to learn more.", "id": "GooglePrivacyDlpV2JobTrigger", "properties": { "createTime": { @@ -8010,6 +8577,24 @@ }, "type": "object" }, + "GooglePrivacyDlpV2ListConnectionsResponse": { + "description": "Response message for ListConnections.", + "id": "GooglePrivacyDlpV2ListConnectionsResponse", + "properties": { + "connections": { + "description": "List of connections.", + "items": { + "$ref": "GooglePrivacyDlpV2Connection" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results. An empty value means there are no more results.", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse": { "description": "Response message for ListDeidentifyTemplates.", "id": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse", @@ -9130,6 +9715,79 @@ }, "type": "object" }, + "GooglePrivacyDlpV2SchemaModifiedCadence": { + "description": "How frequency to modify the profile when the table's schema is modified.", + "id": "GooglePrivacyDlpV2SchemaModifiedCadence", + "properties": { + "frequency": { + "description": "Frequency to regenerate data profiles when the schema is modified. Defaults to monthly.", + "enum": [ + "UPDATE_FREQUENCY_UNSPECIFIED", + "UPDATE_FREQUENCY_NEVER", + "UPDATE_FREQUENCY_DAILY", + "UPDATE_FREQUENCY_MONTHLY" + ], + "enumDescriptions": [ + "Unspecified.", + "After the data profile is created, it will never be updated.", + "The data profile can be updated up to once every 24 hours.", + "The data profile can be updated up to once every 30 days. Default." + ], + "type": "string" + }, + "types": { + "description": "The types of schema modifications to consider. Defaults to NEW_COLUMNS.", + "items": { + "enum": [ + "SQL_SCHEMA_MODIFICATION_UNSPECIFIED", + "NEW_COLUMNS", + "REMOVED_COLUMNS" + ], + "enumDescriptions": [ + "Unused.", + "New columns has appeared.", + "Columns have been removed from the table." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2SearchConnectionsResponse": { + "description": "Response message for SearchConnections.", + "id": "GooglePrivacyDlpV2SearchConnectionsResponse", + "properties": { + "connections": { + "description": "List of connections that match the search query. Note that only a subset of the fields will be populated, and only \"name\" is guaranteed to be set. For full details of a Connection, call GetConnection with the name.", + "items": { + "$ref": "GooglePrivacyDlpV2Connection" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results. An empty value means there are no more results.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2SecretManagerCredential": { + "description": "A credential consisting of a username and password, where the password is stored in a Secret Manager resource. Note: Secret Manager [charges apply](https://cloud.google.com/secret-manager/pricing).", + "id": "GooglePrivacyDlpV2SecretManagerCredential", + "properties": { + "passwordSecretVersionName": { + "description": "Required. The name of the Secret Manager resource that stores the password, in the form \"projects/project-id/secrets/secret-name/versions/version\".", + "type": "string" + }, + "username": { + "description": "Required. The username.", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2SelectedInfoTypes": { "description": "Apply transformation to the selected info_types.", "id": "GooglePrivacyDlpV2SelectedInfoTypes", @@ -9980,6 +10638,22 @@ }, "type": "object" }, + "GooglePrivacyDlpV2UpdateConnectionRequest": { + "description": "Request message for UpdateConnection.", + "id": "GooglePrivacyDlpV2UpdateConnectionRequest", + "properties": { + "connection": { + "$ref": "GooglePrivacyDlpV2Connection", + "description": "Required. The connection with new values for the relevant fields." + }, + "updateMask": { + "description": "Optional. Mask to control which fields get updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest": { "description": "Request message for UpdateDeidentifyTemplate.", "id": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest", diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 4907cc81b02..385a1520a55 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -238,6 +238,7 @@ type OrganizationsInspectTemplatesService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} rs.ColumnDataProfiles = NewOrganizationsLocationsColumnDataProfilesService(s) + rs.Connections = NewOrganizationsLocationsConnectionsService(s) rs.DeidentifyTemplates = NewOrganizationsLocationsDeidentifyTemplatesService(s) rs.DiscoveryConfigs = NewOrganizationsLocationsDiscoveryConfigsService(s) rs.DlpJobs = NewOrganizationsLocationsDlpJobsService(s) @@ -254,6 +255,8 @@ type OrganizationsLocationsService struct { ColumnDataProfiles *OrganizationsLocationsColumnDataProfilesService + Connections *OrganizationsLocationsConnectionsService + DeidentifyTemplates *OrganizationsLocationsDeidentifyTemplatesService DiscoveryConfigs *OrganizationsLocationsDiscoveryConfigsService @@ -280,6 +283,15 @@ type OrganizationsLocationsColumnDataProfilesService struct { s *Service } +func NewOrganizationsLocationsConnectionsService(s *Service) *OrganizationsLocationsConnectionsService { + rs := &OrganizationsLocationsConnectionsService{s: s} + return rs +} + +type OrganizationsLocationsConnectionsService struct { + s *Service +} + func NewOrganizationsLocationsDeidentifyTemplatesService(s *Service) *OrganizationsLocationsDeidentifyTemplatesService { rs := &OrganizationsLocationsDeidentifyTemplatesService{s: s} return rs @@ -451,6 +463,7 @@ type ProjectsJobTriggersService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.ColumnDataProfiles = NewProjectsLocationsColumnDataProfilesService(s) + rs.Connections = NewProjectsLocationsConnectionsService(s) rs.Content = NewProjectsLocationsContentService(s) rs.DeidentifyTemplates = NewProjectsLocationsDeidentifyTemplatesService(s) rs.DiscoveryConfigs = NewProjectsLocationsDiscoveryConfigsService(s) @@ -469,6 +482,8 @@ type ProjectsLocationsService struct { ColumnDataProfiles *ProjectsLocationsColumnDataProfilesService + Connections *ProjectsLocationsConnectionsService + Content *ProjectsLocationsContentService DeidentifyTemplates *ProjectsLocationsDeidentifyTemplatesService @@ -499,6 +514,15 @@ type ProjectsLocationsColumnDataProfilesService struct { s *Service } +func NewProjectsLocationsConnectionsService(s *Service) *ProjectsLocationsConnectionsService { + rs := &ProjectsLocationsConnectionsService{s: s} + return rs +} + +type ProjectsLocationsConnectionsService struct { + s *Service +} + func NewProjectsLocationsContentService(s *Service) *ProjectsLocationsContentService { rs := &ProjectsLocationsContentService{s: s} return rs @@ -696,6 +720,11 @@ type GooglePrivacyDlpV2AllInfoTypes struct { type GooglePrivacyDlpV2AllOtherBigQueryTables struct { } +// GooglePrivacyDlpV2AllOtherDatabaseResources: Match database resources +// not covered by any other filter. +type GooglePrivacyDlpV2AllOtherDatabaseResources struct { +} + // GooglePrivacyDlpV2AllText: Apply to all text. type GooglePrivacyDlpV2AllText struct { } @@ -1549,6 +1578,115 @@ func (s *GooglePrivacyDlpV2CharsToIgnore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2CloudSqlDiscoveryTarget: Target used to match +// against for discovery with Cloud SQL tables. +type GooglePrivacyDlpV2CloudSqlDiscoveryTarget struct { + // Conditions: In addition to matching the filter, these conditions must + // be true before a profile is generated. + Conditions *GooglePrivacyDlpV2DiscoveryCloudSqlConditions `json:"conditions,omitempty"` + + // Disabled: Disable profiling for database resources that match this + // filter. + Disabled *GooglePrivacyDlpV2Disabled `json:"disabled,omitempty"` + + // Filter: Required. The tables the discovery cadence applies to. The + // first target with a matching filter will be the one to apply to a + // table. + Filter *GooglePrivacyDlpV2DiscoveryCloudSqlFilter `json:"filter,omitempty"` + + // GenerationCadence: How often and when to update profiles. New tables + // that match both the filter and conditions are scanned as quickly as + // possible depending on system capacity. + GenerationCadence *GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence `json:"generationCadence,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Conditions") 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. "Conditions") 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 *GooglePrivacyDlpV2CloudSqlDiscoveryTarget) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2CloudSqlDiscoveryTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2CloudSqlIamCredential: Use IAM auth to connect. +// This requires the Cloud SQL IAM feature to be enabled on the +// instance, which is not the default for Cloud SQL. See +// https://cloud.google.com/sql/docs/postgres/authentication and +// https://cloud.google.com/sql/docs/mysql/authentication. +type GooglePrivacyDlpV2CloudSqlIamCredential struct { +} + +// GooglePrivacyDlpV2CloudSqlProperties: Cloud SQL connection +// properties. +type GooglePrivacyDlpV2CloudSqlProperties struct { + // CloudSqlIam: Built-in IAM authentication (must be configured in Cloud + // SQL). + CloudSqlIam *GooglePrivacyDlpV2CloudSqlIamCredential `json:"cloudSqlIam,omitempty"` + + // ConnectionName: Optional. Immutable. The Cloud SQL instance for which + // the connection is defined. Only one connection per instance is + // allowed. This can only be set at creation time, and cannot be + // updated. It is an error to use a connection_name from different + // project or region than the one that holds the connection. For + // example, a Connection resource for Cloud SQL connection_name + // "project-id:us-central1:sql-instance" must be created under the + // parent "projects/project-id/locations/us-central1" + ConnectionName string `json:"connectionName,omitempty"` + + // DatabaseEngine: Required. The database engine used by the Cloud SQL + // instance that this connection configures. + // + // Possible values: + // "DATABASE_ENGINE_UNKNOWN" - An engine that is not currently + // supported by SDP. + // "DATABASE_ENGINE_MYSQL" - Cloud SQL for MySQL instance. + // "DATABASE_ENGINE_POSTGRES" - Cloud SQL for Postgres instance. + DatabaseEngine string `json:"databaseEngine,omitempty"` + + // MaxConnections: Required. DLP will limit its connections to + // max_connections. Must be 2 or greater. + MaxConnections int64 `json:"maxConnections,omitempty"` + + // UsernamePassword: A username and password stored in Secret Manager. + UsernamePassword *GooglePrivacyDlpV2SecretManagerCredential `json:"usernamePassword,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CloudSqlIam") 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. "CloudSqlIam") 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 *GooglePrivacyDlpV2CloudSqlProperties) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2CloudSqlProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2CloudStorageFileSet: Message representing a set of // files in Cloud Storage. type GooglePrivacyDlpV2CloudStorageFileSet struct { @@ -2107,6 +2245,65 @@ func (s *GooglePrivacyDlpV2Conditions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2Connection: A data connection to allow DLP to +// profile data in locations that require additional configuration. +type GooglePrivacyDlpV2Connection struct { + // CloudSql: Connect to a Cloud SQL instance. + CloudSql *GooglePrivacyDlpV2CloudSqlProperties `json:"cloudSql,omitempty"` + + // Errors: Output only. Set if status == ERROR, to provide additional + // details. Will store the last 10 errors sorted with the most recent + // first. + Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` + + // Name: Output only. Name of the connection: + // projects/{project}/locations/{location}/connections/{name}. + Name string `json:"name,omitempty"` + + // State: Required. The connection's state in its lifecycle. + // + // Possible values: + // "CONNECTION_STATE_UNSPECIFIED" - Unused + // "MISSING_CREDENTIALS" - DLP automatically created this connection + // during an initial scan, and it is awaiting full configuration by a + // user. + // "AVAILABLE" - A configured connection that has not encountered any + // errors. + // "ERROR" - A configured connection that encountered errors during + // its last use. It will not be used again until it is set to AVAILABLE. + // If the resolution requires external action, then a request to set the + // status to AVAILABLE will mark this connection for use. Otherwise, any + // changes to the connection properties will automatically mark it as + // AVAILABLE. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CloudSql") 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. "CloudSql") 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 *GooglePrivacyDlpV2Connection) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Connection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2Container: Represents a container that may contain // DLP findings. Examples of a container include a file, table, or // database record. @@ -2265,6 +2462,35 @@ func (s *GooglePrivacyDlpV2ContentLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2CreateConnectionRequest: Request message for +// CreateConnection. +type GooglePrivacyDlpV2CreateConnectionRequest struct { + // Connection: Required. The connection resource. + Connection *GooglePrivacyDlpV2Connection `json:"connection,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Connection") 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. "Connection") 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 *GooglePrivacyDlpV2CreateConnectionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2CreateConnectionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2CreateDeidentifyTemplateRequest: Request message // for CreateDeidentifyTemplate. type GooglePrivacyDlpV2CreateDeidentifyTemplateRequest struct { @@ -3191,6 +3417,151 @@ func (s *GooglePrivacyDlpV2DataSourceType) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2DatabaseResourceCollection: Match database +// resources using regex filters. Examples of database resources are +// tables, views, and stored procedures. +type GooglePrivacyDlpV2DatabaseResourceCollection struct { + // IncludeRegexes: A collection of regular expressions to match a + // database resource against. + IncludeRegexes *GooglePrivacyDlpV2DatabaseResourceRegexes `json:"includeRegexes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IncludeRegexes") 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. "IncludeRegexes") 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 *GooglePrivacyDlpV2DatabaseResourceCollection) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DatabaseResourceCollection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2DatabaseResourceReference: Identifies a single +// database resource, like a table within a database. +type GooglePrivacyDlpV2DatabaseResourceReference struct { + // Instance: Required. The instance where this resource is located. For + // example: Cloud SQL's instance id. + Instance string `json:"instance,omitempty"` + + // ProjectId: Required. If within a project-level config, then this must + // match the config's project id. + ProjectId string `json:"projectId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instance") 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. "Instance") 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 *GooglePrivacyDlpV2DatabaseResourceReference) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DatabaseResourceReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2DatabaseResourceRegex: A pattern to match against +// one or more database resources. At least one pattern must be +// specified. Regular expressions use RE2 syntax +// (https://github.com/google/re2/wiki/Syntax); a guide can be found +// under the google/re2 repository on GitHub. +type GooglePrivacyDlpV2DatabaseResourceRegex struct { + // DatabaseRegex: Regex to test the database name against. If empty, all + // databases match. + DatabaseRegex string `json:"databaseRegex,omitempty"` + + // DatabaseResourceNameRegex: Regex to test the database resource's name + // against. An example of a database resource name is a table's name. + // Other database resource names like view names could be included in + // the future. If empty, all database resources match. + DatabaseResourceNameRegex string `json:"databaseResourceNameRegex,omitempty"` + + // InstanceRegex: Regex to test the instance name against. If empty, all + // instances match. + InstanceRegex string `json:"instanceRegex,omitempty"` + + // ProjectIdRegex: For organizations, if unset, will match all projects. + // Has no effect for Data Profile configurations created within a + // project. + ProjectIdRegex string `json:"projectIdRegex,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseRegex") 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. "DatabaseRegex") 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 *GooglePrivacyDlpV2DatabaseResourceRegex) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DatabaseResourceRegex + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2DatabaseResourceRegexes: A collection of regular +// expressions to determine what database resources to match against. +type GooglePrivacyDlpV2DatabaseResourceRegexes struct { + // Patterns: A group of regular expression patterns to match against one + // or more database resources. Maximum of 100 entries. The sum of all + // regular expression's length can't exceed 10 KiB. + Patterns []*GooglePrivacyDlpV2DatabaseResourceRegex `json:"patterns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Patterns") 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. "Patterns") 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 *GooglePrivacyDlpV2DatabaseResourceRegexes) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DatabaseResourceRegexes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2DatastoreKey: Record key for a finding in Cloud // Datastore. type GooglePrivacyDlpV2DatastoreKey struct { @@ -4112,29 +4483,167 @@ func (s *GooglePrivacyDlpV2DiscoveryBigQueryFilter) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2DiscoveryConfig: Configuration for discovery to -// scan resources for profile generation. Only one discovery -// configuration may exist per organization, folder, or project. The -// generated data profiles are retained according to the [data retention -// policy] -// (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). -type GooglePrivacyDlpV2DiscoveryConfig struct { - // Actions: Actions to execute at the completion of scanning. - Actions []*GooglePrivacyDlpV2DataProfileAction `json:"actions,omitempty"` - - // CreateTime: Output only. The creation timestamp of a DiscoveryConfig. - CreateTime string `json:"createTime,omitempty"` +// GooglePrivacyDlpV2DiscoveryCloudSqlConditions: Requirements that must +// be true before a table is profiled for the first time. +type GooglePrivacyDlpV2DiscoveryCloudSqlConditions struct { + // DatabaseEngines: Optional. Database engines that should be profiled. + // Optional. Defaults to ALL_SUPPORTED_DATABASE_ENGINES if unspecified. + // + // Possible values: + // "DATABASE_ENGINE_UNSPECIFIED" - Unused. + // "ALL_SUPPORTED_DATABASE_ENGINES" - Include all supported database + // engines. + // "MYSQL" - MySql database. + // "POSTGRES" - PostGres database. + DatabaseEngines []string `json:"databaseEngines,omitempty"` + + // Types: Data profiles will only be generated for the database resource + // types specified in this field. If not specified, defaults to + // [DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES]. + // + // Possible values: + // "DATABASE_RESOURCE_TYPE_UNSPECIFIED" - Unused. + // "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES" - Includes database + // resource types that become supported at a later time. + // "DATABASE_RESOURCE_TYPE_TABLE" - Tables. + Types []string `json:"types,omitempty"` - // DisplayName: Display name (max 100 chars) - DisplayName string `json:"displayName,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseEngines") 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:"-"` - // Errors: Output only. A stream of errors encountered when the config - // was activated. Repeated errors may result in the config automatically - // being paused. Output only field. Will return the last 100 errors. - // Whenever the config is modified this list will be cleared. - Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` + // NullFields is a list of field names (e.g. "DatabaseEngines") 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:"-"` +} - // InspectTemplates: Detection logic for profile generation. Not all +func (s *GooglePrivacyDlpV2DiscoveryCloudSqlConditions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryCloudSqlConditions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2DiscoveryCloudSqlFilter: Determines what tables +// will have profiles generated within an organization or project. +// Includes the ability to filter by regular expression patterns on +// project ID, location, instance, database, and database resource name. +type GooglePrivacyDlpV2DiscoveryCloudSqlFilter struct { + // Collection: A specific set of database resources for this filter to + // apply to. + Collection *GooglePrivacyDlpV2DatabaseResourceCollection `json:"collection,omitempty"` + + // DatabaseResourceReference: The database resource to scan. Targets + // including this can only include one target (the target with this + // database resource reference). + DatabaseResourceReference *GooglePrivacyDlpV2DatabaseResourceReference `json:"databaseResourceReference,omitempty"` + + // Others: Catch-all. This should always be the last target in the list + // because anything above it will apply first. Should only appear once + // in a configuration. If none is specified, a default one will be added + // automatically. + Others *GooglePrivacyDlpV2AllOtherDatabaseResources `json:"others,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 *GooglePrivacyDlpV2DiscoveryCloudSqlFilter) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryCloudSqlFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence: How often +// existing tables should have their profiles refreshed. New tables are +// scanned as quickly as possible depending on system capacity. +type GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence struct { + // RefreshFrequency: Data changes (non-schema changes) in Cloud SQL + // tables can't trigger reprofiling. If you set this field, profiles are + // refreshed at this frequency regardless of whether the underlying + // tables have changes. Defaults to never. + // + // Possible values: + // "UPDATE_FREQUENCY_UNSPECIFIED" - Unspecified. + // "UPDATE_FREQUENCY_NEVER" - After the data profile is created, it + // will never be updated. + // "UPDATE_FREQUENCY_DAILY" - The data profile can be updated up to + // once every 24 hours. + // "UPDATE_FREQUENCY_MONTHLY" - The data profile can be updated up to + // once every 30 days. Default. + RefreshFrequency string `json:"refreshFrequency,omitempty"` + + // SchemaModifiedCadence: When to reprofile if the schema has changed. + SchemaModifiedCadence *GooglePrivacyDlpV2SchemaModifiedCadence `json:"schemaModifiedCadence,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RefreshFrequency") 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. "RefreshFrequency") 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 *GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2DiscoveryConfig: Configuration for discovery to +// scan resources for profile generation. Only one discovery +// configuration may exist per organization, folder, or project. The +// generated data profiles are retained according to the [data retention +// policy] +// (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). +type GooglePrivacyDlpV2DiscoveryConfig struct { + // Actions: Actions to execute at the completion of scanning. + Actions []*GooglePrivacyDlpV2DataProfileAction `json:"actions,omitempty"` + + // CreateTime: Output only. The creation timestamp of a DiscoveryConfig. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: Display name (max 100 chars) + DisplayName string `json:"displayName,omitempty"` + + // Errors: Output only. A stream of errors encountered when the config + // was activated. Repeated errors may result in the config automatically + // being paused. Output only field. Will return the last 100 errors. + // Whenever the config is modified this list will be cleared. + Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` + + // InspectTemplates: Detection logic for profile generation. Not all // template features are used by Discovery. FindingLimits, include_quote // and exclude_info_types have no impact on Discovery. Multiple // templates may be provided if there is data in multiple regions. At @@ -4382,6 +4891,10 @@ type GooglePrivacyDlpV2DiscoveryTarget struct { // match a table will be the one applied. BigQueryTarget *GooglePrivacyDlpV2BigQueryDiscoveryTarget `json:"bigQueryTarget,omitempty"` + // CloudSqlTarget: Cloud SQL target for Discovery. The first target to + // match a table will be the one applied. + CloudSqlTarget *GooglePrivacyDlpV2CloudSqlDiscoveryTarget `json:"cloudSqlTarget,omitempty"` + // ForceSendFields is a list of field names (e.g. "BigQueryTarget") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -6420,8 +6933,8 @@ func (s *GooglePrivacyDlpV2InspectionRuleSet) MarshalJSON() ([]byte, error) { type GooglePrivacyDlpV2JobNotificationEmails struct { } -// GooglePrivacyDlpV2JobTrigger: Contains a configuration to make dlp -// api calls on a repeating basis. See +// GooglePrivacyDlpV2JobTrigger: Contains a configuration to make api +// calls on a repeating basis. See // https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers // to learn more. type GooglePrivacyDlpV2JobTrigger struct { @@ -7259,6 +7772,43 @@ func (s *GooglePrivacyDlpV2ListColumnDataProfilesResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2ListConnectionsResponse: Response message for +// ListConnections. +type GooglePrivacyDlpV2ListConnectionsResponse struct { + // Connections: List of connections. + Connections []*GooglePrivacyDlpV2Connection `json:"connections,omitempty"` + + // NextPageToken: Token to retrieve the next page of results. An empty + // value means there are no more results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Connections") 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. "Connections") 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 *GooglePrivacyDlpV2ListConnectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListConnectionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message // for ListDeidentifyTemplates. type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct { @@ -9390,6 +9940,132 @@ func (s *GooglePrivacyDlpV2Schedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2SchemaModifiedCadence: How frequency to modify the +// profile when the table's schema is modified. +type GooglePrivacyDlpV2SchemaModifiedCadence struct { + // Frequency: Frequency to regenerate data profiles when the schema is + // modified. Defaults to monthly. + // + // Possible values: + // "UPDATE_FREQUENCY_UNSPECIFIED" - Unspecified. + // "UPDATE_FREQUENCY_NEVER" - After the data profile is created, it + // will never be updated. + // "UPDATE_FREQUENCY_DAILY" - The data profile can be updated up to + // once every 24 hours. + // "UPDATE_FREQUENCY_MONTHLY" - The data profile can be updated up to + // once every 30 days. Default. + Frequency string `json:"frequency,omitempty"` + + // Types: The types of schema modifications to consider. Defaults to + // NEW_COLUMNS. + // + // Possible values: + // "SQL_SCHEMA_MODIFICATION_UNSPECIFIED" - Unused. + // "NEW_COLUMNS" - New columns has appeared. + // "REMOVED_COLUMNS" - Columns have been removed from the table. + Types []string `json:"types,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Frequency") 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. "Frequency") 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 *GooglePrivacyDlpV2SchemaModifiedCadence) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2SchemaModifiedCadence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2SearchConnectionsResponse: Response message for +// SearchConnections. +type GooglePrivacyDlpV2SearchConnectionsResponse struct { + // Connections: List of connections that match the search query. Note + // that only a subset of the fields will be populated, and only "name" + // is guaranteed to be set. For full details of a Connection, call + // GetConnection with the name. + Connections []*GooglePrivacyDlpV2Connection `json:"connections,omitempty"` + + // NextPageToken: Token to retrieve the next page of results. An empty + // value means there are no more results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Connections") 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. "Connections") 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 *GooglePrivacyDlpV2SearchConnectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2SearchConnectionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2SecretManagerCredential: A credential consisting of +// a username and password, where the password is stored in a Secret +// Manager resource. Note: Secret Manager charges apply +// (https://cloud.google.com/secret-manager/pricing). +type GooglePrivacyDlpV2SecretManagerCredential struct { + // PasswordSecretVersionName: Required. The name of the Secret Manager + // resource that stores the password, in the form + // "projects/project-id/secrets/secret-name/versions/version". + PasswordSecretVersionName string `json:"passwordSecretVersionName,omitempty"` + + // Username: Required. The username. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PasswordSecretVersionName") 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. + // "PasswordSecretVersionName") 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 *GooglePrivacyDlpV2SecretManagerCredential) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2SecretManagerCredential + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2SelectedInfoTypes: Apply transformation to the // selected info_types. type GooglePrivacyDlpV2SelectedInfoTypes struct { @@ -10803,6 +11479,39 @@ func (s *GooglePrivacyDlpV2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2UpdateConnectionRequest: Request message for +// UpdateConnection. +type GooglePrivacyDlpV2UpdateConnectionRequest struct { + // Connection: Required. The connection with new values for the relevant + // fields. + Connection *GooglePrivacyDlpV2Connection `json:"connection,omitempty"` + + // UpdateMask: Optional. Mask to control which fields get updated. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Connection") 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. "Connection") 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 *GooglePrivacyDlpV2UpdateConnectionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2UpdateConnectionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest: Request message // for UpdateDeidentifyTemplate. type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct { @@ -13734,52 +14443,260 @@ func (c *OrganizationsLocationsColumnDataProfilesListCall) Pages(ctx context.Con } } -// method id "dlp.organizations.locations.deidentifyTemplates.create": +// method id "dlp.organizations.locations.connections.search": -type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsConnectionsSearchCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a DeidentifyTemplate for reusing frequently used -// configuration for de-identifying content, images, and storage. See -// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid -// to learn more. +// Search: Searches for Connections in a parent. // -// - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location -// (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { - c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest +// - parent: Parent name, typically an organization, without location. +// For example: "organizations/12345678". +func (r *OrganizationsLocationsConnectionsService) Search(parent string) *OrganizationsLocationsConnectionsSearchCall { + c := &OrganizationsLocationsConnectionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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 *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Filter sets the optional parameter "filter": * Supported +// fields/values - `state` - MISSING|AVAILABLE|ERROR +func (c *OrganizationsLocationsConnectionsSearchCall) Filter(filter string) *OrganizationsLocationsConnectionsSearchCall { + c.urlParams_.Set("filter", filter) return c } -// Context sets the context to be used in this call's Do method. Any +// PageSize sets the optional parameter "pageSize": Number of results +// per page, max 1000. +func (c *OrganizationsLocationsConnectionsSearchCall) PageSize(pageSize int64) *OrganizationsLocationsConnectionsSearchCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token from a +// previous page to return the next set of results. If set, all other +// request fields must match the original request. +func (c *OrganizationsLocationsConnectionsSearchCall) PageToken(pageToken string) *OrganizationsLocationsConnectionsSearchCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *OrganizationsLocationsConnectionsSearchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsConnectionsSearchCall { + 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 *OrganizationsLocationsConnectionsSearchCall) IfNoneMatch(entityTag string) *OrganizationsLocationsConnectionsSearchCall { + 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 *OrganizationsLocationsConnectionsSearchCall) Context(ctx context.Context) *OrganizationsLocationsConnectionsSearchCall { + 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 *OrganizationsLocationsConnectionsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsConnectionsSearchCall) 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, "v2/{+parent}/connections:search") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.locations.connections.search" call. +// Exactly one of *GooglePrivacyDlpV2SearchConnectionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2SearchConnectionsResponse.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 *OrganizationsLocationsConnectionsSearchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2SearchConnectionsResponse, 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 := &GooglePrivacyDlpV2SearchConnectionsResponse{ + 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": "Searches for Connections in a parent.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/connections:search", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.connections.search", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Number of results per page, max 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent name, typically an organization, without location. For example: \"organizations/12345678\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/connections:search", + // "response": { + // "$ref": "GooglePrivacyDlpV2SearchConnectionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsConnectionsSearchCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2SearchConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dlp.organizations.locations.deidentifyTemplates.create": + +type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DeidentifyTemplate for reusing frequently used +// configuration for de-identifying content, images, and storage. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// to learn more. +// +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): +// - Projects scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *OrganizationsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { + c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest + 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 *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { + 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 *OrganizationsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesCreateCall { @@ -18592,23 +19509,23 @@ func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.Ca } -// method id "dlp.organizations.locations.tableDataProfiles.get": +// method id "dlp.organizations.locations.tableDataProfiles.delete": -type OrganizationsLocationsTableDataProfilesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsTableDataProfilesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a table data profile. +// Delete: Delete a TableDataProfile. Will not prevent the profile from +// being regenerated if the table is still included in a discovery +// configuration. // -// - name: Resource name, for example -// `organizations/12345/locations/us/tableDataProfiles/53234423`. -func (r *OrganizationsLocationsTableDataProfilesService) Get(name string) *OrganizationsLocationsTableDataProfilesGetCall { - c := &OrganizationsLocationsTableDataProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the table data profile. +func (r *OrganizationsLocationsTableDataProfilesService) Delete(name string) *OrganizationsLocationsTableDataProfilesDeleteCall { + c := &OrganizationsLocationsTableDataProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18616,54 +19533,41 @@ func (r *OrganizationsLocationsTableDataProfilesService) Get(name string) *Organ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsTableDataProfilesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsTableDataProfilesGetCall { +func (c *OrganizationsLocationsTableDataProfilesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsTableDataProfilesDeleteCall { 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 *OrganizationsLocationsTableDataProfilesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsTableDataProfilesGetCall { - 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 *OrganizationsLocationsTableDataProfilesGetCall) Context(ctx context.Context) *OrganizationsLocationsTableDataProfilesGetCall { +func (c *OrganizationsLocationsTableDataProfilesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsTableDataProfilesDeleteCall { 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 *OrganizationsLocationsTableDataProfilesGetCall) Header() http.Header { +func (c *OrganizationsLocationsTableDataProfilesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsTableDataProfilesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsTableDataProfilesDeleteCall) 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -18674,15 +19578,14 @@ func (c *OrganizationsLocationsTableDataProfilesGetCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.tableDataProfiles.get" call. -// Exactly one of *GooglePrivacyDlpV2TableDataProfile or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2TableDataProfile.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 *OrganizationsLocationsTableDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2TableDataProfile, error) { +// Do executes the "dlp.organizations.locations.tableDataProfiles.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *OrganizationsLocationsTableDataProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18701,7 +19604,7 @@ func (c *OrganizationsLocationsTableDataProfilesGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2TableDataProfile{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18713,10 +19616,158 @@ func (c *OrganizationsLocationsTableDataProfilesGetCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets a table data profile.", + // "description": "Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.", // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.tableDataProfiles.get", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.locations.tableDataProfiles.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the table data profile.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.locations.tableDataProfiles.get": + +type OrganizationsLocationsTableDataProfilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a table data profile. +// +// - name: Resource name, for example +// `organizations/12345/locations/us/tableDataProfiles/53234423`. +func (r *OrganizationsLocationsTableDataProfilesService) Get(name string) *OrganizationsLocationsTableDataProfilesGetCall { + c := &OrganizationsLocationsTableDataProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *OrganizationsLocationsTableDataProfilesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsTableDataProfilesGetCall { + 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 *OrganizationsLocationsTableDataProfilesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsTableDataProfilesGetCall { + 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 *OrganizationsLocationsTableDataProfilesGetCall) Context(ctx context.Context) *OrganizationsLocationsTableDataProfilesGetCall { + 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 *OrganizationsLocationsTableDataProfilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsTableDataProfilesGetCall) 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, "v2/{+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 "dlp.organizations.locations.tableDataProfiles.get" call. +// Exactly one of *GooglePrivacyDlpV2TableDataProfile or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2TableDataProfile.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 *OrganizationsLocationsTableDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2TableDataProfile, 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 := &GooglePrivacyDlpV2TableDataProfile{ + 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 a table data profile.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.tableDataProfiles.get", // "parameterOrder": [ // "name" // ], @@ -24053,67 +25104,1087 @@ type ProjectsLocationsColumnDataProfilesGetCall struct { header_ http.Header } -// Get: Gets a column data profile. +// Get: Gets a column data profile. +// +// - name: Resource name, for example +// `organizations/12345/locations/us/columnDataProfiles/53234423`. +func (r *ProjectsLocationsColumnDataProfilesService) Get(name string) *ProjectsLocationsColumnDataProfilesGetCall { + c := &ProjectsLocationsColumnDataProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsColumnDataProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsColumnDataProfilesGetCall { + 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 *ProjectsLocationsColumnDataProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsColumnDataProfilesGetCall { + 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 *ProjectsLocationsColumnDataProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsColumnDataProfilesGetCall { + 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 *ProjectsLocationsColumnDataProfilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsColumnDataProfilesGetCall) 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, "v2/{+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 "dlp.projects.locations.columnDataProfiles.get" call. +// Exactly one of *GooglePrivacyDlpV2ColumnDataProfile or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2ColumnDataProfile.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 *ProjectsLocationsColumnDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ColumnDataProfile, 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 := &GooglePrivacyDlpV2ColumnDataProfile{ + 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 a column data profile.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/columnDataProfiles/{columnDataProfilesId}", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.columnDataProfiles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name, for example `organizations/12345/locations/us/columnDataProfiles/53234423`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GooglePrivacyDlpV2ColumnDataProfile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.projects.locations.columnDataProfiles.list": + +type ProjectsLocationsColumnDataProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists column data profiles for an organization. +// +// - parent: Resource name of the organization or project, for example +// `organizations/433245324/locations/europe` or +// `projects/project-id/locations/asia`. +func (r *ProjectsLocationsColumnDataProfilesService) List(parent string) *ProjectsLocationsColumnDataProfilesListCall { + c := &ProjectsLocationsColumnDataProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Allows filtering. +// Supported syntax: * Filter expressions are made up of one or more +// restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A +// restriction has the form of `{field} {operator} {value}`. * Supported +// fields/values: - `table_data_profile_name` - The name of the related +// table data profile. - `project_id` - The Google Cloud project ID. +// (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - +// `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID +// of the BigQuery field. - `info_type` - The infotype detected in the +// resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - +// `data_risk_level`: How much risk is associated with this data. - +// `status_code` - an RPC status code as defined in +// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto +// * The operator must be `=` for project_id, dataset_id, and table_id. +// Other filters also support `!=`. Examples: * project_id = 12345 AND +// status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * +// project_id = 12345 AND info_type = STREET_ADDRESS The length of this +// field should be no more than 500 characters. +func (c *ProjectsLocationsColumnDataProfilesListCall) Filter(filter string) *ProjectsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Comma separated list +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case insensitive. The default sorting order is ascending. +// Redundant space characters are insignificant. Only one order field at +// a time is allowed. Examples: * `project_id asc` * `table_id` * +// `sensitivity_level desc` Supported fields are: - `project_id`: The +// Google Cloud project ID. - `dataset_id`: The ID of a BigQuery +// dataset. - `table_id`: The ID of a BigQuery table. - +// `sensitivity_level`: How sensitive the data in a column is, at most. +// - `data_risk_level`: How much risk is associated with this data. - +// `profile_last_generated`: When the profile was last updated in epoch +// seconds. +func (c *ProjectsLocationsColumnDataProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by the server. If zero, server returns a +// page of max size 100. +func (c *ProjectsLocationsColumnDataProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. +func (c *ProjectsLocationsColumnDataProfilesListCall) PageToken(pageToken string) *ProjectsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsColumnDataProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsColumnDataProfilesListCall { + 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 *ProjectsLocationsColumnDataProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsColumnDataProfilesListCall { + 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 *ProjectsLocationsColumnDataProfilesListCall) Context(ctx context.Context) *ProjectsLocationsColumnDataProfilesListCall { + 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 *ProjectsLocationsColumnDataProfilesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsColumnDataProfilesListCall) 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, "v2/{+parent}/columnDataProfiles") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.projects.locations.columnDataProfiles.list" call. +// Exactly one of *GooglePrivacyDlpV2ListColumnDataProfilesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListColumnDataProfilesResponse.ServerResponse.Heade +// r 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 *ProjectsLocationsColumnDataProfilesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListColumnDataProfilesResponse, 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 := &GooglePrivacyDlpV2ListColumnDataProfilesResponse{ + 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": "Lists column data profiles for an organization.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/columnDataProfiles", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.columnDataProfiles.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `table_data_profile_name` - The name of the related table data profile. - `project_id` - The Google Cloud project ID. (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID of the BigQuery field. - `info_type` - The infotype detected in the resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - `data_risk_level`: How much risk is associated with this data. - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` for project_id, dataset_id, and table_id. Other filters also support `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND info_type = STREET_ADDRESS The length of this field should be no more than 500 characters.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The Google Cloud project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a column is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page. This value can be limited by the server. If zero, server returns a page of max size 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/columnDataProfiles", + // "response": { + // "$ref": "GooglePrivacyDlpV2ListColumnDataProfilesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsColumnDataProfilesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListColumnDataProfilesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dlp.projects.locations.connections.create": + +type ProjectsLocationsConnectionsCreateCall struct { + s *Service + parent string + googleprivacydlpv2createconnectionrequest *GooglePrivacyDlpV2CreateConnectionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a Connection to an external data source. +// +// - parent: Parent resource name in the format: +// "projects/{project}/locations/{location}". +func (r *ProjectsLocationsConnectionsService) Create(parent string, googleprivacydlpv2createconnectionrequest *GooglePrivacyDlpV2CreateConnectionRequest) *ProjectsLocationsConnectionsCreateCall { + c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleprivacydlpv2createconnectionrequest = googleprivacydlpv2createconnectionrequest + 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 *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsCreateCall { + 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 *ProjectsLocationsConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsCreateCall { + 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 *ProjectsLocationsConnectionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsCreateCall) 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.googleprivacydlpv2createconnectionrequest) + 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, "v2/{+parent}/connections") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.projects.locations.connections.create" call. +// Exactly one of *GooglePrivacyDlpV2Connection or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2Connection.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 *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2Connection, 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 := &GooglePrivacyDlpV2Connection{ + 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": "Create a Connection to an external data source.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.connections.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name in the format: \"projects/{project}/locations/{location}\".", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/connections", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateConnectionRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2Connection" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.projects.locations.connections.delete": + +type ProjectsLocationsConnectionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a Connection. +// +// - name: Resource name of the Connection to be deleted, in the format: +// "projects/{project}/locations/{location}/connections/{connection}". +func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocationsConnectionsDeleteCall { + c := &ProjectsLocationsConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsDeleteCall { + 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 *ProjectsLocationsConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsDeleteCall { + 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 *ProjectsLocationsConnectionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsDeleteCall) 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, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", 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 "dlp.projects.locations.connections.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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": "Delete a Connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.locations.connections.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the Connection to be deleted, in the format: \"projects/{project}/locations/{location}/connections/{connection}\".", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.projects.locations.connections.get": + +type ProjectsLocationsConnectionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a Connection by name. +// +// - name: Resource name in the format: +// "projects/{project}/locations/{location}/connections/{connection}". +func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocationsConnectionsGetCall { + c := &ProjectsLocationsConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetCall { + 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 *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetCall { + 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 *ProjectsLocationsConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetCall { + 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 *ProjectsLocationsConnectionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsGetCall) 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, "v2/{+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 "dlp.projects.locations.connections.get" call. +// Exactly one of *GooglePrivacyDlpV2Connection or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2Connection.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 *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2Connection, 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 := &GooglePrivacyDlpV2Connection{ + 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": "Get a Connection by name.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.connections.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name in the format: \"projects/{project}/locations/{location}/connections/{connection}\".", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GooglePrivacyDlpV2Connection" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.projects.locations.connections.list": + +type ProjectsLocationsConnectionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Connections in a parent. +// +// - parent: Parent name, for example: +// "projects/project-id/locations/global". +func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall { + c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": * Supported +// fields/values - `state` - MISSING|AVAILABLE|ERROR +func (c *ProjectsLocationsConnectionsListCall) Filter(filter string) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results +// per page, max 1000. +func (c *ProjectsLocationsConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token from a +// previous page to return the next set of results. If set, all other +// request fields must match the original request. +func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListCall { + 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 *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsListCall { + 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 *ProjectsLocationsConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListCall { + 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 *ProjectsLocationsConnectionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsListCall) 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, "v2/{+parent}/connections") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.projects.locations.connections.list" call. +// Exactly one of *GooglePrivacyDlpV2ListConnectionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListConnectionsResponse.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 *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListConnectionsResponse, 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 := &GooglePrivacyDlpV2ListConnectionsResponse{ + 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": "Lists Connections in a parent.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.connections.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Number of results per page, max 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent name, for example: \"projects/project-id/locations/global\".", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/connections", + // "response": { + // "$ref": "GooglePrivacyDlpV2ListConnectionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dlp.projects.locations.connections.patch": + +type ProjectsLocationsConnectionsPatchCall struct { + s *Service + name string + googleprivacydlpv2updateconnectionrequest *GooglePrivacyDlpV2UpdateConnectionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a Connection. // -// - name: Resource name, for example -// `organizations/12345/locations/us/columnDataProfiles/53234423`. -func (r *ProjectsLocationsColumnDataProfilesService) Get(name string) *ProjectsLocationsColumnDataProfilesGetCall { - c := &ProjectsLocationsColumnDataProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name in the format: +// "projects/{project}/locations/{location}/connections/{connection}". +func (r *ProjectsLocationsConnectionsService) Patch(name string, googleprivacydlpv2updateconnectionrequest *GooglePrivacyDlpV2UpdateConnectionRequest) *ProjectsLocationsConnectionsPatchCall { + c := &ProjectsLocationsConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleprivacydlpv2updateconnectionrequest = googleprivacydlpv2updateconnectionrequest 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 *ProjectsLocationsColumnDataProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsColumnDataProfilesGetCall { +func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsPatchCall { 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 *ProjectsLocationsColumnDataProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsColumnDataProfilesGetCall { - 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 *ProjectsLocationsColumnDataProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsColumnDataProfilesGetCall { +func (c *ProjectsLocationsConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsPatchCall { 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 *ProjectsLocationsColumnDataProfilesGetCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsColumnDataProfilesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsPatchCall) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateconnectionrequest) + 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -24124,15 +26195,14 @@ func (c *ProjectsLocationsColumnDataProfilesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.columnDataProfiles.get" call. -// Exactly one of *GooglePrivacyDlpV2ColumnDataProfile or error will be +// Do executes the "dlp.projects.locations.connections.patch" call. +// Exactly one of *GooglePrivacyDlpV2Connection or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2ColumnDataProfile.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 *ProjectsLocationsColumnDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ColumnDataProfile, error) { +// either *GooglePrivacyDlpV2Connection.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 *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2Connection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24151,7 +26221,7 @@ func (c *ProjectsLocationsColumnDataProfilesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ColumnDataProfile{ + ret := &GooglePrivacyDlpV2Connection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24163,25 +26233,28 @@ func (c *ProjectsLocationsColumnDataProfilesGetCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a column data profile.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/columnDataProfiles/{columnDataProfilesId}", - // "httpMethod": "GET", - // "id": "dlp.projects.locations.columnDataProfiles.get", + // "description": "Update a Connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "PATCH", + // "id": "dlp.projects.locations.connections.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name, for example `organizations/12345/locations/us/columnDataProfiles/53234423`.", + // "description": "Required. Resource name in the format: \"projects/{project}/locations/{location}/connections/{connection}\".", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateConnectionRequest" + // }, // "response": { - // "$ref": "GooglePrivacyDlpV2ColumnDataProfile" + // "$ref": "GooglePrivacyDlpV2Connection" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24190,9 +26263,9 @@ func (c *ProjectsLocationsColumnDataProfilesGetCall) Do(opts ...googleapi.CallOp } -// method id "dlp.projects.locations.columnDataProfiles.list": +// method id "dlp.projects.locations.connections.search": -type ProjectsLocationsColumnDataProfilesListCall struct { +type ProjectsLocationsConnectionsSearchCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -24201,69 +26274,34 @@ type ProjectsLocationsColumnDataProfilesListCall struct { header_ http.Header } -// List: Lists column data profiles for an organization. +// Search: Searches for Connections in a parent. // -// - parent: Resource name of the organization or project, for example -// `organizations/433245324/locations/europe` or -// `projects/project-id/locations/asia`. -func (r *ProjectsLocationsColumnDataProfilesService) List(parent string) *ProjectsLocationsColumnDataProfilesListCall { - c := &ProjectsLocationsColumnDataProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent name, typically an organization, without location. +// For example: "organizations/12345678". +func (r *ProjectsLocationsConnectionsService) Search(parent string) *ProjectsLocationsConnectionsSearchCall { + c := &ProjectsLocationsConnectionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Allows filtering. -// Supported syntax: * Filter expressions are made up of one or more -// restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A -// restriction has the form of `{field} {operator} {value}`. * Supported -// fields/values: - `table_data_profile_name` - The name of the related -// table data profile. - `project_id` - The Google Cloud project ID. -// (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - -// `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID -// of the BigQuery field. - `info_type` - The infotype detected in the -// resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - -// `data_risk_level`: How much risk is associated with this data. - -// `status_code` - an RPC status code as defined in -// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto -// * The operator must be `=` for project_id, dataset_id, and table_id. -// Other filters also support `!=`. Examples: * project_id = 12345 AND -// status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * -// project_id = 12345 AND info_type = STREET_ADDRESS The length of this -// field should be no more than 500 characters. -func (c *ProjectsLocationsColumnDataProfilesListCall) Filter(filter string) *ProjectsLocationsColumnDataProfilesListCall { +// Filter sets the optional parameter "filter": * Supported +// fields/values - `state` - MISSING|AVAILABLE|ERROR +func (c *ProjectsLocationsConnectionsSearchCall) Filter(filter string) *ProjectsLocationsConnectionsSearchCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case insensitive. The default sorting order is ascending. -// Redundant space characters are insignificant. Only one order field at -// a time is allowed. Examples: * `project_id asc` * `table_id` * -// `sensitivity_level desc` Supported fields are: - `project_id`: The -// Google Cloud project ID. - `dataset_id`: The ID of a BigQuery -// dataset. - `table_id`: The ID of a BigQuery table. - -// `sensitivity_level`: How sensitive the data in a column is, at most. -// - `data_risk_level`: How much risk is associated with this data. - -// `profile_last_generated`: When the profile was last updated in epoch -// seconds. -func (c *ProjectsLocationsColumnDataProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsColumnDataProfilesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Size of the page. -// This value can be limited by the server. If zero, server returns a -// page of max size 100. -func (c *ProjectsLocationsColumnDataProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsColumnDataProfilesListCall { +// PageSize sets the optional parameter "pageSize": Number of results +// per page, max 1000. +func (c *ProjectsLocationsConnectionsSearchCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsSearchCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. -func (c *ProjectsLocationsColumnDataProfilesListCall) PageToken(pageToken string) *ProjectsLocationsColumnDataProfilesListCall { +// PageToken sets the optional parameter "pageToken": Page token from a +// previous page to return the next set of results. If set, all other +// request fields must match the original request. +func (c *ProjectsLocationsConnectionsSearchCall) PageToken(pageToken string) *ProjectsLocationsConnectionsSearchCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -24271,7 +26309,7 @@ func (c *ProjectsLocationsColumnDataProfilesListCall) PageToken(pageToken string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsColumnDataProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsColumnDataProfilesListCall { +func (c *ProjectsLocationsConnectionsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24281,7 +26319,7 @@ func (c *ProjectsLocationsColumnDataProfilesListCall) Fields(s ...googleapi.Fiel // 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 *ProjectsLocationsColumnDataProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsColumnDataProfilesListCall { +func (c *ProjectsLocationsConnectionsSearchCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsSearchCall { c.ifNoneMatch_ = entityTag return c } @@ -24289,21 +26327,21 @@ func (c *ProjectsLocationsColumnDataProfilesListCall) IfNoneMatch(entityTag stri // 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 *ProjectsLocationsColumnDataProfilesListCall) Context(ctx context.Context) *ProjectsLocationsColumnDataProfilesListCall { +func (c *ProjectsLocationsConnectionsSearchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsSearchCall { 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 *ProjectsLocationsColumnDataProfilesListCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsColumnDataProfilesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsSearchCall) 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_ { @@ -24316,7 +26354,7 @@ func (c *ProjectsLocationsColumnDataProfilesListCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/columnDataProfiles") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/connections:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24329,16 +26367,16 @@ func (c *ProjectsLocationsColumnDataProfilesListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.columnDataProfiles.list" call. -// Exactly one of *GooglePrivacyDlpV2ListColumnDataProfilesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "dlp.projects.locations.connections.search" call. +// Exactly one of *GooglePrivacyDlpV2SearchConnectionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GooglePrivacyDlpV2ListColumnDataProfilesResponse.ServerResponse.Heade -// r or (if a response was returned at all) in +// *GooglePrivacyDlpV2SearchConnectionsResponse.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 *ProjectsLocationsColumnDataProfilesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListColumnDataProfilesResponse, error) { +func (c *ProjectsLocationsConnectionsSearchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2SearchConnectionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24357,7 +26395,7 @@ func (c *ProjectsLocationsColumnDataProfilesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListColumnDataProfilesResponse{ + ret := &GooglePrivacyDlpV2SearchConnectionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24369,46 +26407,41 @@ func (c *ProjectsLocationsColumnDataProfilesListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists column data profiles for an organization.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/columnDataProfiles", + // "description": "Searches for Connections in a parent.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections:search", // "httpMethod": "GET", - // "id": "dlp.projects.locations.columnDataProfiles.list", + // "id": "dlp.projects.locations.connections.search", // "parameterOrder": [ // "parent" // ], // "parameters": { // "filter": { - // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `table_data_profile_name` - The name of the related table data profile. - `project_id` - The Google Cloud project ID. (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID of the BigQuery field. - `info_type` - The infotype detected in the resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - `data_risk_level`: How much risk is associated with this data. - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` for project_id, dataset_id, and table_id. Other filters also support `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND info_type = STREET_ADDRESS The length of this field should be no more than 500 characters.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The Google Cloud project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a column is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + // "description": "Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page. This value can be limited by the server. If zero, server returns a page of max size 100.", + // "description": "Optional. Number of results per page, max 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval.", + // "description": "Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`.", + // "description": "Required. Parent name, typically an organization, without location. For example: \"organizations/12345678\".", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/columnDataProfiles", + // "path": "v2/{+parent}/connections:search", // "response": { - // "$ref": "GooglePrivacyDlpV2ListColumnDataProfilesResponse" + // "$ref": "GooglePrivacyDlpV2SearchConnectionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24420,7 +26453,7 @@ func (c *ProjectsLocationsColumnDataProfilesListCall) Do(opts ...googleapi.CallO // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsColumnDataProfilesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListColumnDataProfilesResponse) error) error { +func (c *ProjectsLocationsConnectionsSearchCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2SearchConnectionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -31104,6 +33137,140 @@ func (c *ProjectsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOpt } +// method id "dlp.projects.locations.tableDataProfiles.delete": + +type ProjectsLocationsTableDataProfilesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a TableDataProfile. Will not prevent the profile from +// being regenerated if the table is still included in a discovery +// configuration. +// +// - name: Resource name of the table data profile. +func (r *ProjectsLocationsTableDataProfilesService) Delete(name string) *ProjectsLocationsTableDataProfilesDeleteCall { + c := &ProjectsLocationsTableDataProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsTableDataProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTableDataProfilesDeleteCall { + 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 *ProjectsLocationsTableDataProfilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTableDataProfilesDeleteCall { + 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 *ProjectsLocationsTableDataProfilesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTableDataProfilesDeleteCall) 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, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", 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 "dlp.projects.locations.tableDataProfiles.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsTableDataProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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": "Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.locations.tableDataProfiles.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the table data profile.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dlp.projects.locations.tableDataProfiles.get": type ProjectsLocationsTableDataProfilesGetCall struct { diff --git a/places/v1/places-api.json b/places/v1/places-api.json index 260860a87b8..f2610e66035 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -276,7 +276,7 @@ } } }, - "revision": "20240328", + "revision": "20240403", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -493,7 +493,7 @@ }, "text": { "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", - "description": "The predicted text. This text does not represent a Place, but rather a text query that could be used in a search endpoint (for example, TextSearch). `text` is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to use `structured_format` instead. They are two different ways to represent a query prediction. Users should not try to parse `structured_format` into `text` or vice versa. May be in mixed languages if the request `input` and `language_code` are in different languages or if part of the query does not have a translation from the local language to `language_code`." + "description": "The predicted text. This text does not represent a Place, but rather a text query that could be used in a search endpoint (for example, Text Search). `text` is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to use `structured_format` instead. They are two different ways to represent a query prediction. Users should not try to parse `structured_format` into `text` or vice versa. May be in mixed languages if the request `input` and `language_code` are in different languages or if part of the query does not have a translation from the local language to `language_code`." } }, "type": "object" diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index da31ed98604..745a54d20a2 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -661,7 +661,7 @@ type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction struc // Text: The predicted text. This text does not represent a Place, but // rather a text query that could be used in a search endpoint (for - // example, TextSearch). `text` is recommended for developers who wish + // example, Text Search). `text` is recommended for developers who wish // to show a single UI element. Developers who wish to show two // separate, but related, UI elements may want to use // `structured_format` instead. They are two different ways to represent diff --git a/verifiedaccess/v2/verifiedaccess-api.json b/verifiedaccess/v2/verifiedaccess-api.json index 4badbaeacf9..b7a4ac3a786 100644 --- a/verifiedaccess/v2/verifiedaccess-api.json +++ b/verifiedaccess/v2/verifiedaccess-api.json @@ -146,7 +146,7 @@ } } }, - "revision": "20230801", + "revision": "20240402", "rootUrl": "https://verifiedaccess.googleapis.com/", "schemas": { "Challenge": { @@ -329,6 +329,10 @@ }, "type": "array" }, + "profileEnrollmentDomain": { + "description": "Enrollment domain of the customer which is currently managing the profile.", + "type": "string" + }, "realtimeUrlCheckMode": { "description": "Whether Enterprise-grade (i.e. custom) unsafe URL scanning is enabled or not. This setting may be controlled by an enterprise policy: https://chromeenterprise.google/policies/#EnterpriseRealTimeUrlCheckMode", "enum": [ diff --git a/verifiedaccess/v2/verifiedaccess-gen.go b/verifiedaccess/v2/verifiedaccess-gen.go index 3899ed7da0d..1c7c23b1b7c 100644 --- a/verifiedaccess/v2/verifiedaccess-gen.go +++ b/verifiedaccess/v2/verifiedaccess-gen.go @@ -353,6 +353,10 @@ type DeviceSignals struct { // Chrome Profile’s user or ChromeOS user. ProfileAffiliationIds []string `json:"profileAffiliationIds,omitempty"` + // ProfileEnrollmentDomain: Enrollment domain of the customer which is + // currently managing the profile. + ProfileEnrollmentDomain string `json:"profileEnrollmentDomain,omitempty"` + // RealtimeUrlCheckMode: Whether Enterprise-grade (i.e. custom) unsafe // URL scanning is enabled or not. This setting may be controlled by an // enterprise policy: diff --git a/workspaceevents/v1/workspaceevents-api.json b/workspaceevents/v1/workspaceevents-api.json index 06b71aef42d..3554c4921c6 100644 --- a/workspaceevents/v1/workspaceevents-api.json +++ b/workspaceevents/v1/workspaceevents-api.json @@ -353,7 +353,7 @@ "type": "string" }, "updateMask": { - "description": "Optional. Required. The field to update. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription.", + "description": "Optional. The field to update. If omitted, updates any fields included in the request. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription. To fully replace the subscription (the equivalent of `PUT`), use `*`. Any omitted fields are updated with empty values.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -424,7 +424,7 @@ } } }, - "revision": "20240305", + "revision": "20240402", "rootUrl": "https://workspaceevents.googleapis.com/", "schemas": { "ListSubscriptionsResponse": { diff --git a/workspaceevents/v1/workspaceevents-gen.go b/workspaceevents/v1/workspaceevents-gen.go index 8374814995a..50c8e6502a3 100644 --- a/workspaceevents/v1/workspaceevents-gen.go +++ b/workspaceevents/v1/workspaceevents-gen.go @@ -1506,11 +1506,13 @@ func (r *SubscriptionsService) Patch(name string, subscription *Subscription) *S return c } -// UpdateMask sets the optional parameter "updateMask": Required. The -// field to update. You can update one of the following fields in a -// subscription: * `expire_time`: The timestamp when the subscription -// expires. * `ttl`: The time-to-live (TTL) or duration of the -// subscription. +// UpdateMask sets the optional parameter "updateMask": The field to +// update. If omitted, updates any fields included in the request. You +// can update one of the following fields in a subscription: * +// `expire_time`: The timestamp when the subscription expires. * `ttl`: +// The time-to-live (TTL) or duration of the subscription. To fully +// replace the subscription (the equivalent of `PUT`), use `*`. Any +// omitted fields are updated with empty values. func (c *SubscriptionsPatchCall) UpdateMask(updateMask string) *SubscriptionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -1631,7 +1633,7 @@ func (c *SubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e // "type": "string" // }, // "updateMask": { - // "description": "Optional. Required. The field to update. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription.", + // "description": "Optional. The field to update. If omitted, updates any fields included in the request. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription. To fully replace the subscription (the equivalent of `PUT`), use `*`. Any omitted fields are updated with empty values.", // "format": "google-fieldmask", // "location": "query", // "type": "string"