diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index af6591e0b7d..d81e06c14da 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -12767,7 +12767,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `display_name` supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"` * `notebookRuntimeType=USER_DEFINED`", + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `display_name` supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` supports = and !=. * `acceleratorType` supports = and !=. Some examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"` * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * `acceleratorType=NVIDIA_TESLA_T4`", "location": "query", "type": "string" }, @@ -13147,7 +13147,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntime` supports = and !=. `notebookRuntime` represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's resource name. * `displayName` supports = and != and regex. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. * API version is UI only: `uiState` supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * `notebookRuntime=\"notebookRuntime123\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"` * `notebookRuntimeTemplate=\"notebookRuntimeTemplate321\"` * `healthState=HEALTHY` * `runtimeState=RUNNING` * `runtimeUser=\"test@google.com\"` * `uiState=UI_RESOURCE_STATE_BEING_DELETED` * `notebookRuntimeType=USER_DEFINED`", + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntime` supports = and !=. `notebookRuntime` represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's resource name. * `displayName` supports = and != and regex. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. * API version is UI only: `uiState` supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` supports = and !=. * `acceleratorType` supports = and !=. Some examples: * `notebookRuntime=\"notebookRuntime123\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"` * `notebookRuntimeTemplate=\"notebookRuntimeTemplate321\"` * `healthState=HEALTHY` * `runtimeState=RUNNING` * `runtimeUser=\"test@google.com\"` * `uiState=UI_RESOURCE_STATE_BEING_DELETED` * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * `acceleratorType=NVIDIA_TESLA_T4`", "location": "query", "type": "string" }, @@ -14740,6 +14740,157 @@ } }, "resources": { + "operations": { + "methods": { + "cancel": { + "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": "v1/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": "v1/{+name}:cancel", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "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": "v1/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": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "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": "v1/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": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/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": "v1/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "wait": { + "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": "v1/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": "v1/{+name}:wait", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "ragFiles": { "methods": { "delete": { @@ -14856,6 +15007,159 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "operations": { + "methods": { + "cancel": { + "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": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "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": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "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": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.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/[^/]+/ragFiles/[^/]+$", + "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": "v1/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "wait": { + "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": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations/{operationsId}:wait", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.operations.wait", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to wait on.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/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": "v1/{+name}:wait", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } } } @@ -18990,7 +19294,7 @@ } } }, - "revision": "20241119", + "revision": "20241203", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -19288,7 +19592,6 @@ "properties": { "encodedVideo": { "description": "Base 64 encoded video bytes.", - "format": "byte", "type": "string" }, "encoding": { @@ -23477,6 +23780,30 @@ "toolParameterKvMatchInput": { "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchInput", "description": "Input for tool parameter key value match metric." + }, + "trajectoryAnyOrderMatchInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput", + "description": "Input for trajectory match any order metric." + }, + "trajectoryExactMatchInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchInput", + "description": "Input for trajectory exact match metric." + }, + "trajectoryInOrderMatchInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchInput", + "description": "Input for trajectory in order match metric." + }, + "trajectoryPrecisionInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionInput", + "description": "Input for trajectory precision metric." + }, + "trajectoryRecallInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallInput", + "description": "Input for trajectory recall metric." + }, + "trajectorySingleToolUseInput": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseInput", + "description": "Input for trajectory single tool use metric." } }, "type": "object" @@ -23584,6 +23911,30 @@ "toolParameterKvMatchResults": { "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchResults", "description": "Results for tool parameter key value match metric." + }, + "trajectoryAnyOrderMatchResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults", + "description": "Result for trajectory any order match metric." + }, + "trajectoryExactMatchResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchResults", + "description": "Result for trajectory exact match metric." + }, + "trajectoryInOrderMatchResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchResults", + "description": "Result for trajectory in order match metric." + }, + "trajectoryPrecisionResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionResults", + "description": "Result for trajectory precision metric." + }, + "trajectoryRecallResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallResults", + "description": "Results for trajectory recall metric." + }, + "trajectorySingleToolUseResults": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseResults", + "description": "Results for trajectory single tool use metric." } }, "type": "object" @@ -26521,6 +26872,25 @@ "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" }, + "responseModalities": { + "description": "Optional. The modalities of the response.", + "items": { + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "AUDIO" + ], + "enumDescriptions": [ + "Unspecified modality. Will be processed as text.", + "Text modality.", + "Image modality.", + "Audio modality." + ], + "type": "string" + }, + "type": "array" + }, "responseSchema": { "$ref": "GoogleCloudAiplatformV1Schema", "description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response." @@ -26534,6 +26904,10 @@ "format": "int32", "type": "integer" }, + "speechConfig": { + "$ref": "GoogleCloudAiplatformV1SpeechConfig", + "description": "Optional. The speech generation config." + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -26546,6 +26920,22 @@ "format": "float", "type": "number" }, + "tokenResolution": { + "description": "Optional. If specified, the token resolution specified will be used.", + "enum": [ + "TOKEN_RESOLUTION_UNSPECIFIED", + "TOKEN_RESOLUTION_LOW", + "TOKEN_RESOLUTION_MEDIUM", + "TOKEN_RESOLUTION_HIGH" + ], + "enumDescriptions": [ + "Token resolution has not been set.", + "Token resolution set to low (64 tokens).", + "Token resolution set to medium (256 tokens).", + "Token resolution set to high (P\u0026S with 256 tokens)." + ], + "type": "string" + }, "topK": { "description": "Optional. If specified, top-k sampling will be used.", "format": "float", @@ -27262,6 +27652,10 @@ "$ref": "GoogleCloudAiplatformV1RagFileTransformationConfig", "description": "Specifies the transformation config for RagFiles." }, + "sharePointSources": { + "$ref": "GoogleCloudAiplatformV1SharePointSources", + "description": "SharePoint sources." + }, "slackSource": { "$ref": "GoogleCloudAiplatformV1SlackSource", "description": "Slack channels with their corresponding access tokens." @@ -28859,6 +29253,7 @@ "NVIDIA_A100_80GB", "NVIDIA_L4", "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3", "TPU_V4_POD", @@ -28878,6 +29273,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -28891,6 +29287,7 @@ "Nvidia A100 80GB GPU.", "Nvidia L4 GPU.", "Nvidia H100 80Gb GPU.", + "Nvidia H100 Mega 80Gb GPU.", "TPU v2.", "TPU v3.", "TPU v4.", @@ -31556,6 +31953,11 @@ "readOnly": true, "type": "string" }, + "dataPersistentDiskSpec": { + "$ref": "GoogleCloudAiplatformV1PersistentDiskSpec", + "description": "Output only. The specification of persistent disk attached to the notebook runtime as data disk storage.", + "readOnly": true + }, "description": { "description": "The description of the NotebookRuntime.", "type": "string" @@ -31569,6 +31971,11 @@ "description": "Output only. Customer-managed encryption key spec for the notebook runtime.", "readOnly": true }, + "eucConfig": { + "$ref": "GoogleCloudAiplatformV1NotebookEucConfig", + "description": "Output only. EUC configuration of the notebook runtime.", + "readOnly": true + }, "expirationTime": { "description": "Output only. Timestamp when this NotebookRuntime will be expired: 1. System Predefined NotebookRuntime: 24 hours after creation. After expiration, system predifined runtime will be deleted. 2. User created NotebookRuntime: 6 months after last upgrade. After expiration, user created runtime will be stopped and allowed for upgrade.", "format": "google-datetime", @@ -31607,11 +32014,21 @@ "description": "The labels with user-defined metadata to organize your NotebookRuntime. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one NotebookRuntime (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with \"aiplatform.googleapis.com/\" and are immutable. Following system labels exist for NotebookRuntime: * \"aiplatform.googleapis.com/notebook_runtime_gce_instance_id\": output only, its value is the Compute Engine instance id. * \"aiplatform.googleapis.com/colab_enterprise_entry_service\": its value is either \"bigquery\" or \"vertex\"; if absent, it should be \"vertex\". This is to describe the entry service, either BigQuery or Vertex.", "type": "object" }, + "machineSpec": { + "$ref": "GoogleCloudAiplatformV1MachineSpec", + "description": "Output only. The specification of a single machine used by the notebook runtime.", + "readOnly": true + }, "name": { "description": "Output only. The resource name of the NotebookRuntime.", "readOnly": true, "type": "string" }, + "networkSpec": { + "$ref": "GoogleCloudAiplatformV1NetworkSpec", + "description": "Output only. Network spec of the notebook runtime.", + "readOnly": true + }, "networkTags": { "description": "Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).", "items": { @@ -31684,10 +32101,15 @@ "type": "boolean" }, "serviceAccount": { - "description": "Output only. The service account that the NotebookRuntime workload runs as.", + "description": "Output only. Deprecated: This field is no longer used and the \"Vertex AI Notebook Service Account\" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. The service account that the NotebookRuntime workload runs as.", "readOnly": true, "type": "string" }, + "shieldedVmConfig": { + "$ref": "GoogleCloudAiplatformV1ShieldedVmConfig", + "description": "Output only. Runtime Shielded VM spec.", + "readOnly": true + }, "updateTime": { "description": "Output only. Timestamp when this NotebookRuntime was most recently updated.", "format": "google-datetime", @@ -31741,7 +32163,8 @@ "description": "The idle shutdown configuration of NotebookRuntimeTemplate. This config will only be set when idle shutdown is enabled." }, "isDefault": { - "description": "Output only. The default template to use if not specified.", + "deprecated": true, + "description": "Output only. Deprecated: This field has no behavior. Use notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if not specified.", "readOnly": true, "type": "boolean" }, @@ -31786,7 +32209,8 @@ "type": "string" }, "serviceAccount": { - "description": "The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", + "deprecated": true, + "description": "Deprecated: This field is ignored and the \"Vertex AI Notebook Service Account\" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. For NotebookExecutionJob, use NotebookExecutionJob.service_account instead. The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", "type": "string" }, "shieldedVmConfig": { @@ -32784,6 +33208,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PrebuiltVoiceConfig": { + "description": "The configuration for the prebuilt speaker to use.", + "id": "GoogleCloudAiplatformV1PrebuiltVoiceConfig", + "properties": { + "voiceName": { + "description": "The name of the preset voice to use.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PredefinedSplit": { "description": "Assigns input data to training, validation, and test sets based on the value of a provided key. Supported only for tabular Datasets.", "id": "GoogleCloudAiplatformV1PredefinedSplit", @@ -34119,6 +34554,10 @@ "readOnly": true, "type": "string" }, + "sharePointSources": { + "$ref": "GoogleCloudAiplatformV1SharePointSources", + "description": "The RagFile is imported from a SharePoint source." + }, "slackSource": { "$ref": "GoogleCloudAiplatformV1SlackSource", "description": "The RagFile is imported from a Slack channel." @@ -34239,6 +34678,10 @@ "$ref": "GoogleCloudAiplatformV1RagEmbeddingModelConfig", "description": "Optional. Immutable. The embedding model config of the Vector DB." }, + "ragManagedDb": { + "$ref": "GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb", + "description": "The config for the RAG-managed Vector DB." + }, "vertexVectorSearch": { "$ref": "GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch", "description": "The config for the Vertex Vector Search." @@ -34257,6 +34700,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb": { + "description": "The config for the default RAG-managed Vector DB.", + "id": "GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch": { "description": "The config for the Vertex Vector Search.", "id": "GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch", @@ -40045,6 +40494,64 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SharePointSources": { + "description": "The SharePointSources to pass to ImportRagFiles.", + "id": "GoogleCloudAiplatformV1SharePointSources", + "properties": { + "sharePointSources": { + "description": "The SharePoint sources.", + "items": { + "$ref": "GoogleCloudAiplatformV1SharePointSourcesSharePointSource" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SharePointSourcesSharePointSource": { + "description": "An individual SharePointSource.", + "id": "GoogleCloudAiplatformV1SharePointSourcesSharePointSource", + "properties": { + "clientId": { + "description": "The Application ID for the app registered in Microsoft Azure Portal. The application must also be configured with MS Graph permissions \"Files.ReadAll\", \"Sites.ReadAll\" and BrowserSiteLists.Read.All.", + "type": "string" + }, + "clientSecret": { + "$ref": "GoogleCloudAiplatformV1ApiAuthApiKeyConfig", + "description": "The application secret for the app registered in Azure." + }, + "driveId": { + "description": "The ID of the drive to download from.", + "type": "string" + }, + "driveName": { + "description": "The name of the drive to download from.", + "type": "string" + }, + "fileId": { + "description": "Output only. The SharePoint file id. Output only.", + "readOnly": true, + "type": "string" + }, + "sharepointFolderId": { + "description": "The ID of the SharePoint folder to download from.", + "type": "string" + }, + "sharepointFolderPath": { + "description": "The path of the SharePoint folder to download from.", + "type": "string" + }, + "sharepointSiteName": { + "description": "The name of the SharePoint site to download from. This can be the site name or the site id.", + "type": "string" + }, + "tenantId": { + "description": "Unique identifier of the Azure Active Directory Instance.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ShieldedVmConfig": { "description": "A set of Shielded Instance options. See [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).", "id": "GoogleCloudAiplatformV1ShieldedVmConfig", @@ -40173,6 +40680,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SpeechConfig": { + "description": "The speech generation config.", + "id": "GoogleCloudAiplatformV1SpeechConfig", + "properties": { + "voiceConfig": { + "$ref": "GoogleCloudAiplatformV1VoiceConfig", + "description": "The configuration for the speaker to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1StartNotebookRuntimeOperationMetadata": { "description": "Metadata information for NotebookService.StartNotebookRuntime.", "id": "GoogleCloudAiplatformV1StartNotebookRuntimeOperationMetadata", @@ -41960,6 +42478,10 @@ }, "type": "array" }, + "googleSearch": { + "$ref": "GoogleCloudAiplatformV1ToolGoogleSearch", + "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google." + }, "googleSearchRetrieval": { "$ref": "GoogleCloudAiplatformV1GoogleSearchRetrieval", "description": "Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search." @@ -41971,6 +42493,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ToolCall": { + "description": "Spec for tool call.", + "id": "GoogleCloudAiplatformV1ToolCall", + "properties": { + "toolInput": { + "description": "Optional. Spec for tool input", + "type": "string" + }, + "toolName": { + "description": "Required. Spec for tool name", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ToolCallValidInput": { "description": "Input for tool call valid metric.", "id": "GoogleCloudAiplatformV1ToolCallValidInput", @@ -42049,6 +42586,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ToolGoogleSearch": { + "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", + "id": "GoogleCloudAiplatformV1ToolGoogleSearch", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1ToolNameMatchInput": { "description": "Input for tool name match metric.", "id": "GoogleCloudAiplatformV1ToolNameMatchInput", @@ -42379,6 +42922,423 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1Trajectory": { + "description": "Spec for trajectory.", + "id": "GoogleCloudAiplatformV1Trajectory", + "properties": { + "toolCalls": { + "description": "Required. Tool calls in the trajectory.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolCall" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput": { + "description": "Instances and metric spec for TrajectoryAnyOrderMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryAnyOrderMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec", + "description": "Required. Spec for TrajectoryAnyOrderMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance": { + "description": "Spec for TrajectoryAnyOrderMatch instance.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue": { + "description": "TrajectoryAnyOrderMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryAnyOrderMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults": { + "description": "Results for TrajectoryAnyOrderMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults", + "properties": { + "trajectoryAnyOrderMatchMetricValues": { + "description": "Output only. TrajectoryAnyOrderMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec": { + "description": "Spec for TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the reference trajectory appear in the predicted trajectory in any order, else 0.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchInput": { + "description": "Instances and metric spec for TrajectoryExactMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryExactMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchSpec", + "description": "Required. Spec for TrajectoryExactMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchInstance": { + "description": "Spec for TrajectoryExactMatch instance.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue": { + "description": "TrajectoryExactMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryExactMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchResults": { + "description": "Results for TrajectoryExactMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchResults", + "properties": { + "trajectoryExactMatchMetricValues": { + "description": "Output only. TrajectoryExactMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchSpec": { + "description": "Spec for TrajectoryExactMatch metric - returns 1 if tool calls in the reference trajectory exactly match the predicted trajectory, else 0.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchInput": { + "description": "Instances and metric spec for TrajectoryInOrderMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryInOrderMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec", + "description": "Required. Spec for TrajectoryInOrderMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance": { + "description": "Spec for TrajectoryInOrderMatch instance.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue": { + "description": "TrajectoryInOrderMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryInOrderMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchResults": { + "description": "Results for TrajectoryInOrderMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchResults", + "properties": { + "trajectoryInOrderMatchMetricValues": { + "description": "Output only. TrajectoryInOrderMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec": { + "description": "Spec for TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference trajectory appear in the predicted trajectory in the same order, else 0.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionInput": { + "description": "Instances and metric spec for TrajectoryPrecision metric.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryPrecision instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionSpec", + "description": "Required. Spec for TrajectoryPrecision metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionInstance": { + "description": "Spec for TrajectoryPrecision instance.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue": { + "description": "TrajectoryPrecision metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryPrecision score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionResults": { + "description": "Results for TrajectoryPrecision metric.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionResults", + "properties": { + "trajectoryPrecisionMetricValues": { + "description": "Output only. TrajectoryPrecision metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionSpec": { + "description": "Spec for TrajectoryPrecision metric - returns a float score based on average precision of individual tool calls.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallInput": { + "description": "Instances and metric spec for TrajectoryRecall metric.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryRecall instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallSpec", + "description": "Required. Spec for TrajectoryRecall metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallInstance": { + "description": "Spec for TrajectoryRecall instance.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallMetricValue": { + "description": "TrajectoryRecall metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryRecall score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallResults": { + "description": "Results for TrajectoryRecall metric.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallResults", + "properties": { + "trajectoryRecallMetricValues": { + "description": "Output only. TrajectoryRecall metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallSpec": { + "description": "Spec for TrajectoryRecall metric - returns a float score based on average recall of individual tool calls.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseInput": { + "description": "Instances and metric spec for TrajectorySingleToolUse metric.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectorySingleToolUse instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseSpec", + "description": "Required. Spec for TrajectorySingleToolUse metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseInstance": { + "description": "Spec for TrajectorySingleToolUse instance.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue": { + "description": "TrajectorySingleToolUse metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectorySingleToolUse score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseResults": { + "description": "Results for TrajectorySingleToolUse metric.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseResults", + "properties": { + "trajectorySingleToolUseMetricValues": { + "description": "Output only. TrajectorySingleToolUse metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseSpec": { + "description": "Spec for TrajectorySingleToolUse metric - returns 1 if tool is present in the predicted trajectory, else 0.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseSpec", + "properties": { + "toolName": { + "description": "Required. Spec for tool name to be checked for in the predicted trajectory.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Trial": { "description": "A message representing a Trial. A Trial contains a unique set of Parameters that has been or will be evaluated, along with the objective metrics got by running the Trial.", "id": "GoogleCloudAiplatformV1Trial", @@ -43183,6 +44143,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1VoiceConfig": { + "description": "The configuration for the voice to use.", + "id": "GoogleCloudAiplatformV1VoiceConfig", + "properties": { + "prebuiltVoiceConfig": { + "$ref": "GoogleCloudAiplatformV1PrebuiltVoiceConfig", + "description": "The configuration for the prebuilt voice to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1WorkerPoolSpec": { "description": "Represents the spec of a worker pool in a job.", "id": "GoogleCloudAiplatformV1WorkerPoolSpec", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index c556f82603c..c4076a8c31c 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -1174,6 +1174,7 @@ type ProjectsLocationsPublishersModelsService struct { func NewProjectsLocationsRagCorporaService(s *Service) *ProjectsLocationsRagCorporaService { rs := &ProjectsLocationsRagCorporaService{s: s} + rs.Operations = NewProjectsLocationsRagCorporaOperationsService(s) rs.RagFiles = NewProjectsLocationsRagCorporaRagFilesService(s) return rs } @@ -1181,16 +1182,39 @@ func NewProjectsLocationsRagCorporaService(s *Service) *ProjectsLocationsRagCorp type ProjectsLocationsRagCorporaService struct { s *Service + Operations *ProjectsLocationsRagCorporaOperationsService + RagFiles *ProjectsLocationsRagCorporaRagFilesService } +func NewProjectsLocationsRagCorporaOperationsService(s *Service) *ProjectsLocationsRagCorporaOperationsService { + rs := &ProjectsLocationsRagCorporaOperationsService{s: s} + return rs +} + +type ProjectsLocationsRagCorporaOperationsService struct { + s *Service +} + func NewProjectsLocationsRagCorporaRagFilesService(s *Service) *ProjectsLocationsRagCorporaRagFilesService { rs := &ProjectsLocationsRagCorporaRagFilesService{s: s} + rs.Operations = NewProjectsLocationsRagCorporaRagFilesOperationsService(s) return rs } type ProjectsLocationsRagCorporaRagFilesService struct { s *Service + + Operations *ProjectsLocationsRagCorporaRagFilesOperationsService +} + +func NewProjectsLocationsRagCorporaRagFilesOperationsService(s *Service) *ProjectsLocationsRagCorporaRagFilesOperationsService { + rs := &ProjectsLocationsRagCorporaRagFilesOperationsService{s: s} + return rs +} + +type ProjectsLocationsRagCorporaRagFilesOperationsService struct { + s *Service } func NewProjectsLocationsReasoningEnginesService(s *Service) *ProjectsLocationsReasoningEnginesService { @@ -7877,6 +7901,18 @@ type GoogleCloudAiplatformV1EvaluateInstancesRequest struct { ToolParameterKeyMatchInput *GoogleCloudAiplatformV1ToolParameterKeyMatchInput `json:"toolParameterKeyMatchInput,omitempty"` // ToolParameterKvMatchInput: Input for tool parameter key value match metric. ToolParameterKvMatchInput *GoogleCloudAiplatformV1ToolParameterKVMatchInput `json:"toolParameterKvMatchInput,omitempty"` + // TrajectoryAnyOrderMatchInput: Input for trajectory match any order metric. + TrajectoryAnyOrderMatchInput *GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput `json:"trajectoryAnyOrderMatchInput,omitempty"` + // TrajectoryExactMatchInput: Input for trajectory exact match metric. + TrajectoryExactMatchInput *GoogleCloudAiplatformV1TrajectoryExactMatchInput `json:"trajectoryExactMatchInput,omitempty"` + // TrajectoryInOrderMatchInput: Input for trajectory in order match metric. + TrajectoryInOrderMatchInput *GoogleCloudAiplatformV1TrajectoryInOrderMatchInput `json:"trajectoryInOrderMatchInput,omitempty"` + // TrajectoryPrecisionInput: Input for trajectory precision metric. + TrajectoryPrecisionInput *GoogleCloudAiplatformV1TrajectoryPrecisionInput `json:"trajectoryPrecisionInput,omitempty"` + // TrajectoryRecallInput: Input for trajectory recall metric. + TrajectoryRecallInput *GoogleCloudAiplatformV1TrajectoryRecallInput `json:"trajectoryRecallInput,omitempty"` + // TrajectorySingleToolUseInput: Input for trajectory single tool use metric. + TrajectorySingleToolUseInput *GoogleCloudAiplatformV1TrajectorySingleToolUseInput `json:"trajectorySingleToolUseInput,omitempty"` // ForceSendFields is a list of field names (e.g. "BleuInput") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -7958,6 +7994,20 @@ type GoogleCloudAiplatformV1EvaluateInstancesResponse struct { // ToolParameterKvMatchResults: Results for tool parameter key value match // metric. ToolParameterKvMatchResults *GoogleCloudAiplatformV1ToolParameterKVMatchResults `json:"toolParameterKvMatchResults,omitempty"` + // TrajectoryAnyOrderMatchResults: Result for trajectory any order match + // metric. + TrajectoryAnyOrderMatchResults *GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults `json:"trajectoryAnyOrderMatchResults,omitempty"` + // TrajectoryExactMatchResults: Result for trajectory exact match metric. + TrajectoryExactMatchResults *GoogleCloudAiplatformV1TrajectoryExactMatchResults `json:"trajectoryExactMatchResults,omitempty"` + // TrajectoryInOrderMatchResults: Result for trajectory in order match metric. + TrajectoryInOrderMatchResults *GoogleCloudAiplatformV1TrajectoryInOrderMatchResults `json:"trajectoryInOrderMatchResults,omitempty"` + // TrajectoryPrecisionResults: Result for trajectory precision metric. + TrajectoryPrecisionResults *GoogleCloudAiplatformV1TrajectoryPrecisionResults `json:"trajectoryPrecisionResults,omitempty"` + // TrajectoryRecallResults: Results for trajectory recall metric. + TrajectoryRecallResults *GoogleCloudAiplatformV1TrajectoryRecallResults `json:"trajectoryRecallResults,omitempty"` + // TrajectorySingleToolUseResults: Results for trajectory single tool use + // metric. + TrajectorySingleToolUseResults *GoogleCloudAiplatformV1TrajectorySingleToolUseResults `json:"trajectorySingleToolUseResults,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -12314,6 +12364,14 @@ type GoogleCloudAiplatformV1GenerationConfig struct { // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` + // ResponseModalities: Optional. The modalities of the response. + // + // Possible values: + // "MODALITY_UNSPECIFIED" - Unspecified modality. Will be processed as text. + // "TEXT" - Text modality. + // "IMAGE" - Image modality. + // "AUDIO" - Audio modality. + ResponseModalities []string `json:"responseModalities,omitempty"` // ResponseSchema: Optional. The `Schema` object allows the definition of input // and output data types. These types can be objects, but also primitives and // arrays. Represents a select subset of an OpenAPI 3.0 schema object @@ -12325,10 +12383,22 @@ type GoogleCloudAiplatformV1GenerationConfig struct { RoutingConfig *GoogleCloudAiplatformV1GenerationConfigRoutingConfig `json:"routingConfig,omitempty"` // Seed: Optional. Seed. Seed int64 `json:"seed,omitempty"` + // SpeechConfig: Optional. The speech generation config. + SpeechConfig *GoogleCloudAiplatformV1SpeechConfig `json:"speechConfig,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. Temperature float64 `json:"temperature,omitempty"` + // TokenResolution: Optional. If specified, the token resolution specified will + // be used. + // + // Possible values: + // "TOKEN_RESOLUTION_UNSPECIFIED" - Token resolution has not been set. + // "TOKEN_RESOLUTION_LOW" - Token resolution set to low (64 tokens). + // "TOKEN_RESOLUTION_MEDIUM" - Token resolution set to medium (256 tokens). + // "TOKEN_RESOLUTION_HIGH" - Token resolution set to high (P&S with 256 + // tokens). + TokenResolution string `json:"tokenResolution,omitempty"` // TopK: Optional. If specified, top-k sampling will be used. TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. @@ -13285,6 +13355,8 @@ type GoogleCloudAiplatformV1ImportRagFilesConfig struct { // RagFileTransformationConfig: Specifies the transformation config for // RagFiles. RagFileTransformationConfig *GoogleCloudAiplatformV1RagFileTransformationConfig `json:"ragFileTransformationConfig,omitempty"` + // SharePointSources: SharePoint sources. + SharePointSources *GoogleCloudAiplatformV1SharePointSources `json:"sharePointSources,omitempty"` // SlackSource: Slack channels with their corresponding access tokens. SlackSource *GoogleCloudAiplatformV1SlackSource `json:"slackSource,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsSource") to @@ -15713,6 +15785,7 @@ type GoogleCloudAiplatformV1MachineSpec struct { // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. // "NVIDIA_L4" - Nvidia L4 GPU. // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. + // "NVIDIA_H100_MEGA_80GB" - Nvidia H100 Mega 80Gb GPU. // "TPU_V2" - TPU v2. // "TPU_V3" - TPU v3. // "TPU_V4_POD" - TPU v4. @@ -19373,6 +19446,9 @@ func (s GoogleCloudAiplatformV1NotebookIdleShutdownConfig) MarshalJSON() ([]byte type GoogleCloudAiplatformV1NotebookRuntime struct { // CreateTime: Output only. Timestamp when this NotebookRuntime was created. CreateTime string `json:"createTime,omitempty"` + // DataPersistentDiskSpec: Output only. The specification of persistent disk + // attached to the notebook runtime as data disk storage. + DataPersistentDiskSpec *GoogleCloudAiplatformV1PersistentDiskSpec `json:"dataPersistentDiskSpec,omitempty"` // Description: The description of the NotebookRuntime. Description string `json:"description,omitempty"` // DisplayName: Required. The display name of the NotebookRuntime. The name can @@ -19381,6 +19457,8 @@ type GoogleCloudAiplatformV1NotebookRuntime struct { // EncryptionSpec: Output only. Customer-managed encryption key spec for the // notebook runtime. EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` + // EucConfig: Output only. EUC configuration of the notebook runtime. + EucConfig *GoogleCloudAiplatformV1NotebookEucConfig `json:"eucConfig,omitempty"` // ExpirationTime: Output only. Timestamp when this NotebookRuntime will be // expired: 1. System Predefined NotebookRuntime: 24 hours after creation. // After expiration, system predifined runtime will be deleted. 2. User created @@ -19415,8 +19493,13 @@ type GoogleCloudAiplatformV1NotebookRuntime struct { // either "bigquery" or "vertex"; if absent, it should be "vertex". This is to // describe the entry service, either BigQuery or Vertex. Labels map[string]string `json:"labels,omitempty"` + // MachineSpec: Output only. The specification of a single machine used by the + // notebook runtime. + MachineSpec *GoogleCloudAiplatformV1MachineSpec `json:"machineSpec,omitempty"` // Name: Output only. The resource name of the NotebookRuntime. Name string `json:"name,omitempty"` + // NetworkSpec: Output only. Network spec of the notebook runtime. + NetworkSpec *GoogleCloudAiplatformV1NetworkSpec `json:"networkSpec,omitempty"` // NetworkTags: Optional. The Compute Engine tags to add to runtime (see // Tagging instances // (https://cloud.google.com/vpc/docs/add-remove-network-tags)). @@ -19456,9 +19539,16 @@ type GoogleCloudAiplatformV1NotebookRuntime struct { SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` // SatisfiesPzs: Output only. Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // ServiceAccount: Output only. The service account that the NotebookRuntime - // workload runs as. + // ServiceAccount: Output only. Deprecated: This field is no longer used and + // the "Vertex AI Notebook Service Account" + // (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is + // used for the runtime workload identity. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + // for more details. The service account that the NotebookRuntime workload runs + // as. ServiceAccount string `json:"serviceAccount,omitempty"` + // ShieldedVmConfig: Output only. Runtime Shielded VM spec. + ShieldedVmConfig *GoogleCloudAiplatformV1ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` // UpdateTime: Output only. Timestamp when this NotebookRuntime was most // recently updated. UpdateTime string `json:"updateTime,omitempty"` @@ -19514,7 +19604,9 @@ type GoogleCloudAiplatformV1NotebookRuntimeTemplate struct { // NotebookRuntimeTemplate. This config will only be set when idle shutdown is // enabled. IdleShutdownConfig *GoogleCloudAiplatformV1NotebookIdleShutdownConfig `json:"idleShutdownConfig,omitempty"` - // IsDefault: Output only. The default template to use if not specified. + // IsDefault: Output only. Deprecated: This field has no behavior. Use + // notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if + // not specified. IsDefault bool `json:"isDefault,omitempty"` // Labels: The labels with user-defined metadata to organize the // NotebookRuntimeTemplates. Label keys and values can be no longer than 64 @@ -19543,10 +19635,16 @@ type GoogleCloudAiplatformV1NotebookRuntimeTemplate struct { // user. // "ONE_CLICK" - runtime or template with system defined configurations. NotebookRuntimeType string `json:"notebookRuntimeType,omitempty"` - // ServiceAccount: The service account that the runtime workload runs as. You - // can use any service account within the same project, but you must have the - // service account user permission to use the instance. If not specified, the - // Compute Engine default service account + // ServiceAccount: Deprecated: This field is ignored and the "Vertex AI + // Notebook Service Account" + // (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is + // used for the runtime workload identity. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + // for more details. For NotebookExecutionJob, use + // NotebookExecutionJob.service_account instead. The service account that the + // runtime workload runs as. You can use any service account within the same + // project, but you must have the service account user permission to use the + // instance. If not specified, the Compute Engine default service account // (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) // is used. ServiceAccount string `json:"serviceAccount,omitempty"` @@ -20784,6 +20882,29 @@ func (s GoogleCloudAiplatformV1Port) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PrebuiltVoiceConfig: The configuration for the +// prebuilt speaker to use. +type GoogleCloudAiplatformV1PrebuiltVoiceConfig struct { + // VoiceName: The name of the preset voice to use. + VoiceName string `json:"voiceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1PrebuiltVoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PrebuiltVoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PredefinedSplit: Assigns input data to training, // validation, and test sets based on the value of a provided key. Supported // only for tabular Datasets. @@ -22698,6 +22819,8 @@ type GoogleCloudAiplatformV1RagFile struct { JiraSource *GoogleCloudAiplatformV1JiraSource `json:"jiraSource,omitempty"` // Name: Output only. The resource name of the RagFile. Name string `json:"name,omitempty"` + // SharePointSources: The RagFile is imported from a SharePoint source. + SharePointSources *GoogleCloudAiplatformV1SharePointSources `json:"sharePointSources,omitempty"` // SlackSource: The RagFile is imported from a Slack channel. SlackSource *GoogleCloudAiplatformV1SlackSource `json:"slackSource,omitempty"` // UpdateTime: Output only. Timestamp when this RagFile was last updated. @@ -22897,6 +23020,8 @@ type GoogleCloudAiplatformV1RagVectorDbConfig struct { // RagEmbeddingModelConfig: Optional. Immutable. The embedding model config of // the Vector DB. RagEmbeddingModelConfig *GoogleCloudAiplatformV1RagEmbeddingModelConfig `json:"ragEmbeddingModelConfig,omitempty"` + // RagManagedDb: The config for the RAG-managed Vector DB. + RagManagedDb *GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb `json:"ragManagedDb,omitempty"` // VertexVectorSearch: The config for the Vertex Vector Search. VertexVectorSearch *GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch `json:"vertexVectorSearch,omitempty"` // ForceSendFields is a list of field names (e.g. "ApiAuth") to unconditionally @@ -22940,6 +23065,11 @@ func (s GoogleCloudAiplatformV1RagVectorDbConfigPinecone) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb: The config for the +// default RAG-managed Vector DB. +type GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb struct { +} + // GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch: The config for // the Vertex Vector Search. type GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch struct { @@ -32060,6 +32190,71 @@ func (s GoogleCloudAiplatformV1ServiceAccountSpec) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SharePointSources: The SharePointSources to pass to +// ImportRagFiles. +type GoogleCloudAiplatformV1SharePointSources struct { + // SharePointSources: The SharePoint sources. + SharePointSources []*GoogleCloudAiplatformV1SharePointSourcesSharePointSource `json:"sharePointSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "SharePointSources") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SharePointSources") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SharePointSources) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SharePointSources + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SharePointSourcesSharePointSource: An individual +// SharePointSource. +type GoogleCloudAiplatformV1SharePointSourcesSharePointSource struct { + // ClientId: The Application ID for the app registered in Microsoft Azure + // Portal. The application must also be configured with MS Graph permissions + // "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. + ClientId string `json:"clientId,omitempty"` + // ClientSecret: The application secret for the app registered in Azure. + ClientSecret *GoogleCloudAiplatformV1ApiAuthApiKeyConfig `json:"clientSecret,omitempty"` + // DriveId: The ID of the drive to download from. + DriveId string `json:"driveId,omitempty"` + // DriveName: The name of the drive to download from. + DriveName string `json:"driveName,omitempty"` + // FileId: Output only. The SharePoint file id. Output only. + FileId string `json:"fileId,omitempty"` + // SharepointFolderId: The ID of the SharePoint folder to download from. + SharepointFolderId string `json:"sharepointFolderId,omitempty"` + // SharepointFolderPath: The path of the SharePoint folder to download from. + SharepointFolderPath string `json:"sharepointFolderPath,omitempty"` + // SharepointSiteName: The name of the SharePoint site to download from. This + // can be the site name or the site id. + SharepointSiteName string `json:"sharepointSiteName,omitempty"` + // TenantId: Unique identifier of the Azure Active Directory Instance. + TenantId string `json:"tenantId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClientId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ClientId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SharePointSourcesSharePointSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SharePointSourcesSharePointSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ShieldedVmConfig: A set of Shielded Instance options. // See Images using supported Shielded VM features // (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). @@ -32274,6 +32469,28 @@ func (s GoogleCloudAiplatformV1SpecialistPool) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SpeechConfig: The speech generation config. +type GoogleCloudAiplatformV1SpeechConfig struct { + // VoiceConfig: The configuration for the speaker to use. + VoiceConfig *GoogleCloudAiplatformV1VoiceConfig `json:"voiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SpeechConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SpeechConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1StartNotebookRuntimeOperationMetadata: Metadata // information for NotebookService.StartNotebookRuntime. type GoogleCloudAiplatformV1StartNotebookRuntimeOperationMetadata struct { @@ -34734,6 +34951,9 @@ type GoogleCloudAiplatformV1Tool struct { // will generate the final response back to the user. Maximum 128 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearch: Optional. GoogleSearch tool type. Tool to support Google + // Search in Model. Powered by Google. + GoogleSearch *GoogleCloudAiplatformV1ToolGoogleSearch `json:"googleSearch,omitempty"` // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. // Specialized retrieval tool that is powered by Google search. GoogleSearchRetrieval *GoogleCloudAiplatformV1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` @@ -34759,6 +34979,30 @@ func (s GoogleCloudAiplatformV1Tool) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ToolCall: Spec for tool call. +type GoogleCloudAiplatformV1ToolCall struct { + // ToolInput: Optional. Spec for tool input + ToolInput string `json:"toolInput,omitempty"` + // ToolName: Required. Spec for tool name + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInput") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolInput") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1ToolCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolCall + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ToolCallValidInput: Input for tool call valid metric. type GoogleCloudAiplatformV1ToolCallValidInput struct { // Instances: Required. Repeated tool call valid instances. @@ -34895,6 +35139,11 @@ func (s GoogleCloudAiplatformV1ToolConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ToolGoogleSearch: GoogleSearch tool type. Tool to +// support Google Search in Model. Powered by Google. +type GoogleCloudAiplatformV1ToolGoogleSearch struct { +} + // GoogleCloudAiplatformV1ToolNameMatchInput: Input for tool name match metric. type GoogleCloudAiplatformV1ToolNameMatchInput struct { // Instances: Required. Repeated tool name match instances. @@ -35411,2194 +35660,5858 @@ func (s GoogleCloudAiplatformV1TrainingPipeline) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1Trial: A message representing a Trial. A Trial -// contains a unique set of Parameters that has been or will be evaluated, -// along with the objective metrics got by running the Trial. -type GoogleCloudAiplatformV1Trial struct { - // ClientId: Output only. The identifier of the client that originally - // requested this Trial. Each client is identified by a unique client_id. When - // a client asks for a suggestion, Vertex AI Vizier will assign it a Trial. The - // client should evaluate the Trial, complete it, and report back to Vertex AI - // Vizier. If suggestion is asked again by same client_id before the Trial is - // completed, the same Trial will be returned. Multiple clients with different - // client_ids can ask for suggestions simultaneously, each of them will get - // their own Trial. - ClientId string `json:"clientId,omitempty"` - // CustomJob: Output only. The CustomJob name linked to the Trial. It's set for - // a HyperparameterTuningJob's Trial. - CustomJob string `json:"customJob,omitempty"` - // EndTime: Output only. Time when the Trial's status changed to `SUCCEEDED` or - // `INFEASIBLE`. - EndTime string `json:"endTime,omitempty"` - // FinalMeasurement: Output only. The final measurement containing the - // objective value. - FinalMeasurement *GoogleCloudAiplatformV1Measurement `json:"finalMeasurement,omitempty"` - // Id: Output only. The identifier of the Trial assigned by the service. - Id string `json:"id,omitempty"` - // InfeasibleReason: Output only. A human readable string describing why the - // Trial is infeasible. This is set only if Trial state is `INFEASIBLE`. - InfeasibleReason string `json:"infeasibleReason,omitempty"` - // Measurements: Output only. A list of measurements that are strictly - // lexicographically ordered by their induced tuples (steps, elapsed_duration). - // These are used for early stopping computations. - Measurements []*GoogleCloudAiplatformV1Measurement `json:"measurements,omitempty"` - // Name: Output only. Resource name of the Trial assigned by the service. - Name string `json:"name,omitempty"` - // Parameters: Output only. The parameters of the Trial. - Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` - // StartTime: Output only. Time when the Trial was started. - StartTime string `json:"startTime,omitempty"` - // State: Output only. The detailed state of the Trial. - // - // Possible values: - // "STATE_UNSPECIFIED" - The Trial state is unspecified. - // "REQUESTED" - Indicates that a specific Trial has been requested, but it - // has not yet been suggested by the service. - // "ACTIVE" - Indicates that the Trial has been suggested. - // "STOPPING" - Indicates that the Trial should stop according to the - // service. - // "SUCCEEDED" - Indicates that the Trial is completed successfully. - // "INFEASIBLE" - Indicates that the Trial should not be attempted again. The - // service will set a Trial to INFEASIBLE when it's done but missing the - // final_measurement. - State string `json:"state,omitempty"` - // WebAccessUris: Output only. URIs for accessing interactive shells - // (https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) - // (one URI for each training node). Only available if this trial is part of a - // HyperparameterTuningJob and the job's trial_job_spec.enable_web_access field - // is `true`. The keys are names of each node used for the trial; for example, - // `workerpool0-0` for the primary node, `workerpool1-0` for the first node in - // the second worker pool, and `workerpool1-1` for the second node in the - // second worker pool. The values are the URIs for each node's interactive - // shell. - WebAccessUris map[string]string `json:"webAccessUris,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClientId") to +// GoogleCloudAiplatformV1Trajectory: Spec for trajectory. +type GoogleCloudAiplatformV1Trajectory struct { + // ToolCalls: Required. Tool calls in the trajectory. + ToolCalls []*GoogleCloudAiplatformV1ToolCall `json:"toolCalls,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolCalls") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientId") to include in API + // NullFields is a list of field names (e.g. "ToolCalls") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1Trial) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1Trial +func (s GoogleCloudAiplatformV1Trajectory) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Trajectory return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type GoogleCloudAiplatformV1TrialContext struct { - // Description: A human-readable field which can store a description of this - // context. This will become part of the resulting Trial's description field. - Description string `json:"description,omitempty"` - // Parameters: If/when a Trial is generated or selected from this Context, its - // Parameters will match any parameters specified here. (I.e. if this context - // specifies parameter name:'a' int_value:3, then a resulting Trial will have - // int_value:3 for its parameter named 'a'.) Note that we first attempt to - // match existing REQUESTED Trials with contexts, and if there are no matches, - // we generate suggestions in the subspace defined by the parameters specified - // here. NOTE: a Context without any Parameters matches the entire feasible - // search space. - Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput: Instances and metric +// spec for TrajectoryAnyOrderMatch metric. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput struct { + // Instances: Required. Repeated TrajectoryAnyOrderMatch instance. + Instances []*GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryAnyOrderMatch metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API + // NullFields is a list of field names (e.g. "Instances") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TrialContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TrialContext +func (s GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TrialParameter: A message representing a parameter to -// be tuned. -type GoogleCloudAiplatformV1TrialParameter struct { - // ParameterId: Output only. The ID of the parameter. The parameter should be - // defined in StudySpec's Parameters. - ParameterId string `json:"parameterId,omitempty"` - // Value: Output only. The value of the parameter. `number_value` will be set - // if a parameter defined in StudySpec is in type 'INTEGER', 'DOUBLE' or - // 'DISCRETE'. `string_value` will be set if a parameter defined in StudySpec - // is in type 'CATEGORICAL'. - Value interface{} `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "ParameterId") to +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance: Spec for +// TrajectoryAnyOrderMatch instance. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ParameterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TrialParameter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TrialParameter +func (s GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TunedModel: The Model Registry Model and Online -// Prediction Endpoint assiociated with this TuningJob. -type GoogleCloudAiplatformV1TunedModel struct { - // Endpoint: Output only. A resource name of an Endpoint. Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}`. - Endpoint string `json:"endpoint,omitempty"` - // Model: Output only. The resource name of the TunedModel. Format: - // `projects/{project}/locations/{location}/models/{model}`. - Model string `json:"model,omitempty"` - // ForceSendFields is a list of field names (e.g. "Endpoint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue: +// TrajectoryAnyOrderMatch metric value for an instance. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue struct { + // Score: Output only. TrajectoryAnyOrderMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Endpoint") to include in API + // NullFields is a list of field names (e.g. "Score") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TunedModel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TunedModel +func (s GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TunedModelRef: TunedModel Reference for legacy model -// migration. -type GoogleCloudAiplatformV1TunedModelRef struct { - // PipelineJob: Support migration from tuning job list page, from bison model - // to gemini model. - PipelineJob string `json:"pipelineJob,omitempty"` - // TunedModel: Support migration from model registry. - TunedModel string `json:"tunedModel,omitempty"` - // TuningJob: Support migration from tuning job list page, from - // gemini-1.0-pro-002 to 1.5 and above. - TuningJob string `json:"tuningJob,omitempty"` - // ForceSendFields is a list of field names (e.g. "PipelineJob") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +func (s *GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults: Results for +// TrajectoryAnyOrderMatch metric. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults struct { + // TrajectoryAnyOrderMatchMetricValues: Output only. TrajectoryAnyOrderMatch + // metric values. + TrajectoryAnyOrderMatchMetricValues []*GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue `json:"trajectoryAnyOrderMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryAnyOrderMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PipelineJob") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + // NullFields is a list of field names (e.g. + // "TrajectoryAnyOrderMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TunedModelRef) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TunedModelRef +func (s GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TuningDataStats: The tuning data statistic values for -// TuningJob. -type GoogleCloudAiplatformV1TuningDataStats struct { - // SupervisedTuningDataStats: The SFT Tuning data stats. - SupervisedTuningDataStats *GoogleCloudAiplatformV1SupervisedTuningDataStats `json:"supervisedTuningDataStats,omitempty"` - // ForceSendFields is a list of field names (e.g. "SupervisedTuningDataStats") - // to unconditionally include in API requests. By default, fields with empty or +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec: Spec for +// TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the +// reference trajectory appear in the predicted trajectory in any order, else +// 0. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec struct { +} + +// GoogleCloudAiplatformV1TrajectoryExactMatchInput: Instances and metric spec +// for TrajectoryExactMatch metric. +type GoogleCloudAiplatformV1TrajectoryExactMatchInput struct { + // Instances: Required. Repeated TrajectoryExactMatch instance. + Instances []*GoogleCloudAiplatformV1TrajectoryExactMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryExactMatch metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryExactMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SupervisedTuningDataStats") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TuningDataStats) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TuningDataStats +func (s GoogleCloudAiplatformV1TrajectoryExactMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TuningJob: Represents a TuningJob that runs with -// Google owned models. -type GoogleCloudAiplatformV1TuningJob struct { - // BaseModel: The base model that is being tuned, e.g., "gemini-1.0-pro-002". . - BaseModel string `json:"baseModel,omitempty"` - // CreateTime: Output only. Time when the TuningJob was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. The description of the TuningJob. - Description string `json:"description,omitempty"` - // EncryptionSpec: Customer-managed encryption key options for a TuningJob. If - // this is set, then all resources created by the TuningJob will be encrypted - // with the provided encryption key. - EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` - // EndTime: Output only. Time when the TuningJob entered any of the following - // JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, - // `JOB_STATE_EXPIRED`. - EndTime string `json:"endTime,omitempty"` - // Error: Output only. Only populated when job's state is `JOB_STATE_FAILED` or - // `JOB_STATE_CANCELLED`. - Error *GoogleRpcStatus `json:"error,omitempty"` - // Experiment: Output only. The Experiment associated with this TuningJob. - Experiment string `json:"experiment,omitempty"` - // Labels: Optional. The labels with user-defined metadata to organize - // TuningJob and generated resources such as Model and Endpoint. Label keys and - // values can be no longer than 64 characters (Unicode codepoints), can only - // contain lowercase letters, numeric characters, underscores and dashes. - // International characters are allowed. See https://goo.gl/xmQnxf for more - // information and examples of labels. - Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Identifier. Resource name of a TuningJob. Format: - // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` - Name string `json:"name,omitempty"` - // ServiceAccount: The service account that the tuningJob workload runs as. If - // not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project - // will be used. See - // https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent - // Users starting the pipeline must have the `iam.serviceAccounts.actAs` - // permission on this service account. - ServiceAccount string `json:"serviceAccount,omitempty"` - // StartTime: Output only. Time when the TuningJob for the first time entered - // the `JOB_STATE_RUNNING` state. - StartTime string `json:"startTime,omitempty"` - // State: Output only. The detailed state of the job. - // - // Possible values: - // "JOB_STATE_UNSPECIFIED" - The job state is unspecified. - // "JOB_STATE_QUEUED" - The job has been just created or resumed and - // processing has not yet begun. - // "JOB_STATE_PENDING" - The service is preparing to run the job. - // "JOB_STATE_RUNNING" - The job is in progress. - // "JOB_STATE_SUCCEEDED" - The job completed successfully. - // "JOB_STATE_FAILED" - The job failed. - // "JOB_STATE_CANCELLING" - The job is being cancelled. From this state the - // job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or - // `JOB_STATE_CANCELLED`. - // "JOB_STATE_CANCELLED" - The job has been cancelled. - // "JOB_STATE_PAUSED" - The job has been stopped, and can be resumed. - // "JOB_STATE_EXPIRED" - The job has expired. - // "JOB_STATE_UPDATING" - The job is being updated. Only jobs in the - // `RUNNING` state can be updated. After updating, the job goes back to the - // `RUNNING` state. - // "JOB_STATE_PARTIALLY_SUCCEEDED" - The job is partially succeeded, some - // results may be missing due to errors. - State string `json:"state,omitempty"` - // SupervisedTuningSpec: Tuning Spec for Supervised Fine Tuning. - SupervisedTuningSpec *GoogleCloudAiplatformV1SupervisedTuningSpec `json:"supervisedTuningSpec,omitempty"` - // TunedModel: Output only. The tuned model resources assiociated with this - // TuningJob. - TunedModel *GoogleCloudAiplatformV1TunedModel `json:"tunedModel,omitempty"` - // TunedModelDisplayName: Optional. The display name of the TunedModel. The - // name can be up to 128 characters long and can consist of any UTF-8 - // characters. - TunedModelDisplayName string `json:"tunedModelDisplayName,omitempty"` - // TuningDataStats: Output only. The tuning data statistics associated with - // this TuningJob. - TuningDataStats *GoogleCloudAiplatformV1TuningDataStats `json:"tuningDataStats,omitempty"` - // UpdateTime: Output only. Time when the TuningJob was most recently 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. "BaseModel") to +// GoogleCloudAiplatformV1TrajectoryExactMatchInstance: Spec for +// TrajectoryExactMatch instance. +type GoogleCloudAiplatformV1TrajectoryExactMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BaseModel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TuningJob) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TuningJob +func (s GoogleCloudAiplatformV1TrajectoryExactMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployIndexOperationMetadata: Runtime operation -// information for IndexEndpointService.UndeployIndex. -type GoogleCloudAiplatformV1UndeployIndexOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue: TrajectoryExactMatch +// metric value for an instance. +type GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue struct { + // Score: Output only. TrajectoryExactMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UndeployIndexOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UndeployIndexOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployIndexRequest: Request message for -// IndexEndpointService.UndeployIndex. -type GoogleCloudAiplatformV1UndeployIndexRequest struct { - // DeployedIndexId: Required. The ID of the DeployedIndex to be undeployed from - // the IndexEndpoint. - DeployedIndexId string `json:"deployedIndexId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeployedIndexId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +func (s *GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectoryExactMatchResults: Results for +// TrajectoryExactMatch metric. +type GoogleCloudAiplatformV1TrajectoryExactMatchResults struct { + // TrajectoryExactMatchMetricValues: Output only. TrajectoryExactMatch metric + // values. + TrajectoryExactMatchMetricValues []*GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue `json:"trajectoryExactMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryExactMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeployedIndexId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + // NullFields is a list of field names (e.g. + // "TrajectoryExactMatchMetricValues") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UndeployIndexRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UndeployIndexRequest +func (s GoogleCloudAiplatformV1TrajectoryExactMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployIndexResponse: Response message for -// IndexEndpointService.UndeployIndex. -type GoogleCloudAiplatformV1UndeployIndexResponse struct { +// GoogleCloudAiplatformV1TrajectoryExactMatchSpec: Spec for +// TrajectoryExactMatch metric - returns 1 if tool calls in the reference +// trajectory exactly match the predicted trajectory, else 0. +type GoogleCloudAiplatformV1TrajectoryExactMatchSpec struct { } -// GoogleCloudAiplatformV1UndeployModelOperationMetadata: Runtime operation -// information for EndpointService.UndeployModel. -type GoogleCloudAiplatformV1UndeployModelOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectoryInOrderMatchInput: Instances and metric +// spec for TrajectoryInOrderMatch metric. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchInput struct { + // Instances: Required. Repeated TrajectoryInOrderMatch instance. + Instances []*GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryInOrderMatch metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UndeployModelOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UndeployModelOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryInOrderMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployModelRequest: Request message for -// EndpointService.UndeployModel. -type GoogleCloudAiplatformV1UndeployModelRequest struct { - // DeployedModelId: Required. The ID of the DeployedModel to be undeployed from - // the Endpoint. - DeployedModelId string `json:"deployedModelId,omitempty"` - // TrafficSplit: If this field is provided, then the Endpoint's traffic_split - // will be overwritten with it. If last DeployedModel is being undeployed from - // the Endpoint, the [Endpoint.traffic_split] will always end up empty when - // this call returns. A DeployedModel will be successfully undeployed only if - // it doesn't have any traffic assigned to it when this method executes, or if - // this field unassigns any traffic to it. - TrafficSplit map[string]int64 `json:"trafficSplit,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeployedModelId") to +// GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance: Spec for +// TrajectoryInOrderMatch instance. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeployedModelId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UndeployModelRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UndeployModelRequest +func (s GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployModelResponse: Response message for -// EndpointService.UndeployModel. -type GoogleCloudAiplatformV1UndeployModelResponse struct { -} - -// GoogleCloudAiplatformV1UnmanagedContainerModel: Contains model information -// necessary to perform batch prediction without requiring a full model import. -type GoogleCloudAiplatformV1UnmanagedContainerModel struct { - // ArtifactUri: The path to the directory containing the Model artifact and any - // of its supporting files. - ArtifactUri string `json:"artifactUri,omitempty"` - // ContainerSpec: Input only. The specification of the container that is to be - // used when deploying this Model. - ContainerSpec *GoogleCloudAiplatformV1ModelContainerSpec `json:"containerSpec,omitempty"` - // PredictSchemata: Contains the schemata used in Model's predictions and - // explanations - PredictSchemata *GoogleCloudAiplatformV1PredictSchemata `json:"predictSchemata,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArtifactUri") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue: +// TrajectoryInOrderMatch metric value for an instance. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue struct { + // Score: Output only. TrajectoryInOrderMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArtifactUri") to include in API + // NullFields is a list of field names (e.g. "Score") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UnmanagedContainerModel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UnmanagedContainerModel +func (s GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata: -// Runtime operation information for UpdateDeploymentResourcePool method. -type GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. +func (s *GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectoryInOrderMatchResults: Results for +// TrajectoryInOrderMatch metric. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchResults struct { + // TrajectoryInOrderMatchMetricValues: Output only. TrajectoryInOrderMatch + // metric values. + TrajectoryInOrderMatchMetricValues []*GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue `json:"trajectoryInOrderMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryInOrderMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectoryInOrderMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryInOrderMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest: Request message for -// EndpointService.UpdateEndpointLongRunning. -type GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest struct { - // Endpoint: Required. The Endpoint which replaces the resource on the server. - // Currently we only support updating the `client_connection_config` field, all - // the other fields' update will be blocked. - Endpoint *GoogleCloudAiplatformV1Endpoint `json:"endpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "Endpoint") to +// GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec: Spec for +// TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference +// trajectory appear in the predicted trajectory in the same order, else 0. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec struct { +} + +// GoogleCloudAiplatformV1TrajectoryPrecisionInput: Instances and metric spec +// for TrajectoryPrecision metric. +type GoogleCloudAiplatformV1TrajectoryPrecisionInput struct { + // Instances: Required. Repeated TrajectoryPrecision instance. + Instances []*GoogleCloudAiplatformV1TrajectoryPrecisionInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryPrecision metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryPrecisionSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Endpoint") to include in API + // NullFields is a list of field names (e.g. "Instances") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest +func (s GoogleCloudAiplatformV1TrajectoryPrecisionInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata: Runtime -// operation information for ModelService.UpdateExplanationDataset. -type GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata struct { - // GenericMetadata: The common part of the operation metadata. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectoryPrecisionInstance: Spec for +// TrajectoryPrecision instance. +type GoogleCloudAiplatformV1TrajectoryPrecisionInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryPrecisionInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateExplanationDatasetRequest: Request message for -// ModelService.UpdateExplanationDataset. -type GoogleCloudAiplatformV1UpdateExplanationDatasetRequest struct { - // Examples: The example config containing the location of the dataset. - Examples *GoogleCloudAiplatformV1Examples `json:"examples,omitempty"` - // ForceSendFields is a list of field names (e.g. "Examples") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue: TrajectoryPrecision +// metric value for an instance. +type GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue struct { + // Score: Output only. TrajectoryPrecision score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Examples") to include in API + // NullFields is a list of field names (e.g. "Score") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateExplanationDatasetRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateExplanationDatasetRequest +func (s GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateExplanationDatasetResponse: Response message of -// ModelService.UpdateExplanationDataset operation. -type GoogleCloudAiplatformV1UpdateExplanationDatasetResponse struct { +func (s *GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil } -// GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata: Details of -// operations that perform update FeatureGroup. -type GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata struct { - // GenericMetadata: Operation metadata for FeatureGroup. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryPrecisionResults: Results for +// TrajectoryPrecision metric. +type GoogleCloudAiplatformV1TrajectoryPrecisionResults struct { + // TrajectoryPrecisionMetricValues: Output only. TrajectoryPrecision metric + // values. + TrajectoryPrecisionMetricValues []*GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue `json:"trajectoryPrecisionMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryPrecisionMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "TrajectoryPrecisionMetricValues") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryPrecisionResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata: Details of -// operations that perform update FeatureOnlineStore. -type GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata struct { - // GenericMetadata: Operation metadata for FeatureOnlineStore. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectoryPrecisionSpec: Spec for TrajectoryPrecision +// metric - returns a float score based on average precision of individual tool +// calls. +type GoogleCloudAiplatformV1TrajectoryPrecisionSpec struct { +} + +// GoogleCloudAiplatformV1TrajectoryRecallInput: Instances and metric spec for +// TrajectoryRecall metric. +type GoogleCloudAiplatformV1TrajectoryRecallInput struct { + // Instances: Required. Repeated TrajectoryRecall instance. + Instances []*GoogleCloudAiplatformV1TrajectoryRecallInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryRecall metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryRecallSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryRecallInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateFeatureOperationMetadata: Details of operations -// that perform update Feature. -type GoogleCloudAiplatformV1UpdateFeatureOperationMetadata struct { - // GenericMetadata: Operation metadata for Feature Update. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectoryRecallInstance: Spec for TrajectoryRecall +// instance. +type GoogleCloudAiplatformV1TrajectoryRecallInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeatureOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeatureOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryRecallInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata: Details of -// operations that perform update FeatureView. -type GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata struct { - // GenericMetadata: Operation metadata for FeatureView Update. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryRecallMetricValue: TrajectoryRecall metric +// value for an instance. +type GoogleCloudAiplatformV1TrajectoryRecallMetricValue struct { + // Score: Output only. TrajectoryRecall score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryRecallMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata: Details of -// operations that perform update Featurestore. -type GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata struct { - // GenericMetadata: Operation metadata for Featurestore. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +func (s *GoogleCloudAiplatformV1TrajectoryRecallMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectoryRecallResults: Results for TrajectoryRecall +// metric. +type GoogleCloudAiplatformV1TrajectoryRecallResults struct { + // TrajectoryRecallMetricValues: Output only. TrajectoryRecall metric values. + TrajectoryRecallMetricValues []*GoogleCloudAiplatformV1TrajectoryRecallMetricValue `json:"trajectoryRecallMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryRecallMetricValues") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TrajectoryRecallMetricValues") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1TrajectoryRecallResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1TrajectoryRecallSpec: Spec for TrajectoryRecall +// metric - returns a float score based on average recall of individual tool +// calls. +type GoogleCloudAiplatformV1TrajectoryRecallSpec struct { +} + +// GoogleCloudAiplatformV1TrajectorySingleToolUseInput: Instances and metric +// spec for TrajectorySingleToolUse metric. +type GoogleCloudAiplatformV1TrajectorySingleToolUseInput struct { + // Instances: Required. Repeated TrajectorySingleToolUse instance. + Instances []*GoogleCloudAiplatformV1TrajectorySingleToolUseInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectorySingleToolUse metric. + MetricSpec *GoogleCloudAiplatformV1TrajectorySingleToolUseSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateIndexOperationMetadata: Runtime operation -// information for IndexService.UpdateIndex. -type GoogleCloudAiplatformV1UpdateIndexOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // NearestNeighborSearchOperationMetadata: The operation metadata with regard - // to Matching Engine Index operation. - NearestNeighborSearchOperationMetadata *GoogleCloudAiplatformV1NearestNeighborSearchOperationMetadata `json:"nearestNeighborSearchOperationMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectorySingleToolUseInstance: Spec for +// TrajectorySingleToolUse instance. +type GoogleCloudAiplatformV1TrajectorySingleToolUseInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateIndexOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateIndexOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata: -// Runtime operation information for -// JobService.UpdateModelDeploymentMonitoringJob. -type GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue: +// TrajectorySingleToolUse metric value for an instance. +type GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue struct { + // Score: Output only. TrajectorySingleToolUse score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata: Details of -// operations that perform update PersistentResource. -type GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata struct { - // GenericMetadata: Operation metadata for PersistentResource. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ProgressMessage: Progress Message for Update LRO - ProgressMessage string `json:"progressMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +func (s *GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectorySingleToolUseResults: Results for +// TrajectorySingleToolUse metric. +type GoogleCloudAiplatformV1TrajectorySingleToolUseResults struct { + // TrajectorySingleToolUseMetricValues: Output only. TrajectorySingleToolUse + // metric values. + TrajectorySingleToolUseMetricValues []*GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue `json:"trajectorySingleToolUseMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectorySingleToolUseMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + // NullFields is a list of field names (e.g. + // "TrajectorySingleToolUseMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata: Runtime -// operation metadata for SpecialistPoolService.UpdateSpecialistPool. -type GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // SpecialistPool: Output only. The name of the SpecialistPool to which the - // specialists are being added. Format: - // `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_po - // ol}` - SpecialistPool string `json:"specialistPool,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectorySingleToolUseSpec: Spec for +// TrajectorySingleToolUse metric - returns 1 if tool is present in the +// predicted trajectory, else 0. +type GoogleCloudAiplatformV1TrajectorySingleToolUseSpec struct { + // ToolName: Required. Spec for tool name to be checked for in the predicted + // trajectory. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ToolName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata: Details of -// operations that perform update Tensorboard. -type GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata struct { - // GenericMetadata: Operation metadata for Tensorboard. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1Trial: A message representing a Trial. A Trial +// contains a unique set of Parameters that has been or will be evaluated, +// along with the objective metrics got by running the Trial. +type GoogleCloudAiplatformV1Trial struct { + // ClientId: Output only. The identifier of the client that originally + // requested this Trial. Each client is identified by a unique client_id. When + // a client asks for a suggestion, Vertex AI Vizier will assign it a Trial. The + // client should evaluate the Trial, complete it, and report back to Vertex AI + // Vizier. If suggestion is asked again by same client_id before the Trial is + // completed, the same Trial will be returned. Multiple clients with different + // client_ids can ask for suggestions simultaneously, each of them will get + // their own Trial. + ClientId string `json:"clientId,omitempty"` + // CustomJob: Output only. The CustomJob name linked to the Trial. It's set for + // a HyperparameterTuningJob's Trial. + CustomJob string `json:"customJob,omitempty"` + // EndTime: Output only. Time when the Trial's status changed to `SUCCEEDED` or + // `INFEASIBLE`. + EndTime string `json:"endTime,omitempty"` + // FinalMeasurement: Output only. The final measurement containing the + // objective value. + FinalMeasurement *GoogleCloudAiplatformV1Measurement `json:"finalMeasurement,omitempty"` + // Id: Output only. The identifier of the Trial assigned by the service. + Id string `json:"id,omitempty"` + // InfeasibleReason: Output only. A human readable string describing why the + // Trial is infeasible. This is set only if Trial state is `INFEASIBLE`. + InfeasibleReason string `json:"infeasibleReason,omitempty"` + // Measurements: Output only. A list of measurements that are strictly + // lexicographically ordered by their induced tuples (steps, elapsed_duration). + // These are used for early stopping computations. + Measurements []*GoogleCloudAiplatformV1Measurement `json:"measurements,omitempty"` + // Name: Output only. Resource name of the Trial assigned by the service. + Name string `json:"name,omitempty"` + // Parameters: Output only. The parameters of the Trial. + Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` + // StartTime: Output only. Time when the Trial was started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The detailed state of the Trial. + // + // Possible values: + // "STATE_UNSPECIFIED" - The Trial state is unspecified. + // "REQUESTED" - Indicates that a specific Trial has been requested, but it + // has not yet been suggested by the service. + // "ACTIVE" - Indicates that the Trial has been suggested. + // "STOPPING" - Indicates that the Trial should stop according to the + // service. + // "SUCCEEDED" - Indicates that the Trial is completed successfully. + // "INFEASIBLE" - Indicates that the Trial should not be attempted again. The + // service will set a Trial to INFEASIBLE when it's done but missing the + // final_measurement. + State string `json:"state,omitempty"` + // WebAccessUris: Output only. URIs for accessing interactive shells + // (https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) + // (one URI for each training node). Only available if this trial is part of a + // HyperparameterTuningJob and the job's trial_job_spec.enable_web_access field + // is `true`. The keys are names of each node used for the trial; for example, + // `workerpool0-0` for the primary node, `workerpool1-0` for the first node in + // the second worker pool, and `workerpool1-1` for the second node in the + // second worker pool. The values are the URIs for each node's interactive + // shell. + WebAccessUris map[string]string `json:"webAccessUris,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ClientId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ClientId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata +func (s GoogleCloudAiplatformV1Trial) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Trial return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata: Metadata -// information for NotebookService.UpgradeNotebookRuntime. -type GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ProgressMessage: A human-readable message that shows the intermediate - // progress details of NotebookRuntime. - ProgressMessage string `json:"progressMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +type GoogleCloudAiplatformV1TrialContext struct { + // Description: A human-readable field which can store a description of this + // context. This will become part of the resulting Trial's description field. + Description string `json:"description,omitempty"` + // Parameters: If/when a Trial is generated or selected from this Context, its + // Parameters will match any parameters specified here. (I.e. if this context + // specifies parameter name:'a' int_value:3, then a resulting Trial will have + // int_value:3 for its parameter named 'a'.) Note that we first attempt to + // match existing REQUESTED Trials with contexts, and if there are no matches, + // we generate suggestions in the subspace defined by the parameters specified + // here. NOTE: a Context without any Parameters matches the entire feasible + // search space. + Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata +func (s GoogleCloudAiplatformV1TrialContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrialContext return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest: Request message for -// NotebookService.UpgradeNotebookRuntime. -type GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest struct { -} - -// GoogleCloudAiplatformV1UploadModelOperationMetadata: Details of -// ModelService.UploadModel operation. -type GoogleCloudAiplatformV1UploadModelOperationMetadata struct { - // GenericMetadata: The common part of the operation metadata. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrialParameter: A message representing a parameter to +// be tuned. +type GoogleCloudAiplatformV1TrialParameter struct { + // ParameterId: Output only. The ID of the parameter. The parameter should be + // defined in StudySpec's Parameters. + ParameterId string `json:"parameterId,omitempty"` + // Value: Output only. The value of the parameter. `number_value` will be set + // if a parameter defined in StudySpec is in type 'INTEGER', 'DOUBLE' or + // 'DISCRETE'. `string_value` will be set if a parameter defined in StudySpec + // is in type 'CATEGORICAL'. + Value interface{} `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "ParameterId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ParameterId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadModelOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadModelOperationMetadata +func (s GoogleCloudAiplatformV1TrialParameter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrialParameter return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadModelRequest: Request message for -// ModelService.UploadModel. -type GoogleCloudAiplatformV1UploadModelRequest struct { - // Model: Required. The Model to create. - Model *GoogleCloudAiplatformV1Model `json:"model,omitempty"` - // ModelId: Optional. The ID to use for the uploaded Model, which will become - // the final component of the model resource name. This value may be up to 63 - // characters, and valid characters are `[a-z0-9_-]`. The first character - // cannot be a number or hyphen. - ModelId string `json:"modelId,omitempty"` - // ParentModel: Optional. The resource name of the model into which to upload - // the version. Only specify this field when uploading a new version. - ParentModel string `json:"parentModel,omitempty"` - // ServiceAccount: Optional. The user-provided custom service account to use to - // do the model upload. If empty, Vertex AI Service Agent - // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) - // will be used to access resources needed to upload the model. This account - // must belong to the target project where the model is uploaded to, i.e., the - // project specified in the `parent` field of this request and have necessary - // read permissions (to Google Cloud Storage, Artifact Registry, etc.). - ServiceAccount string `json:"serviceAccount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Model") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudAiplatformV1TunedModel: The Model Registry Model and Online +// Prediction Endpoint assiociated with this TuningJob. +type GoogleCloudAiplatformV1TunedModel struct { + // Endpoint: Output only. A resource name of an Endpoint. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}`. + Endpoint string `json:"endpoint,omitempty"` + // Model: Output only. The resource name of the TunedModel. Format: + // `projects/{project}/locations/{location}/models/{model}`. + Model string `json:"model,omitempty"` + // ForceSendFields is a list of field names (e.g. "Endpoint") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Model") to include in API + // NullFields is a list of field names (e.g. "Endpoint") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadModelRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadModelRequest +func (s GoogleCloudAiplatformV1TunedModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TunedModel return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadModelResponse: Response message of -// ModelService.UploadModel operation. -type GoogleCloudAiplatformV1UploadModelResponse struct { - // Model: The name of the uploaded Model resource. Format: - // `projects/{project}/locations/{location}/models/{model}` - Model string `json:"model,omitempty"` - // ModelVersionId: Output only. The version ID of the model that is uploaded. - ModelVersionId string `json:"modelVersionId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Model") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudAiplatformV1TunedModelRef: TunedModel Reference for legacy model +// migration. +type GoogleCloudAiplatformV1TunedModelRef struct { + // PipelineJob: Support migration from tuning job list page, from bison model + // to gemini model. + PipelineJob string `json:"pipelineJob,omitempty"` + // TunedModel: Support migration from model registry. + TunedModel string `json:"tunedModel,omitempty"` + // TuningJob: Support migration from tuning job list page, from + // gemini-1.0-pro-002 to 1.5 and above. + TuningJob string `json:"tuningJob,omitempty"` + // ForceSendFields is a list of field names (e.g. "PipelineJob") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Model") to include in API + // NullFields is a list of field names (e.g. "PipelineJob") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadModelResponse +func (s GoogleCloudAiplatformV1TunedModelRef) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TunedModelRef return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadRagFileConfig: Config for uploading RagFile. -type GoogleCloudAiplatformV1UploadRagFileConfig struct { - // RagFileTransformationConfig: Specifies the transformation config for - // RagFiles. - RagFileTransformationConfig *GoogleCloudAiplatformV1RagFileTransformationConfig `json:"ragFileTransformationConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RagFileTransformationConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. +// GoogleCloudAiplatformV1TuningDataStats: The tuning data statistic values for +// TuningJob. +type GoogleCloudAiplatformV1TuningDataStats struct { + // SupervisedTuningDataStats: The SFT Tuning data stats. + SupervisedTuningDataStats *GoogleCloudAiplatformV1SupervisedTuningDataStats `json:"supervisedTuningDataStats,omitempty"` + // ForceSendFields is a list of field names (e.g. "SupervisedTuningDataStats") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RagFileTransformationConfig") to + // NullFields is a list of field names (e.g. "SupervisedTuningDataStats") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadRagFileConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadRagFileConfig +func (s GoogleCloudAiplatformV1TuningDataStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TuningDataStats return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadRagFileRequest: Request message for -// VertexRagDataService.UploadRagFile. -type GoogleCloudAiplatformV1UploadRagFileRequest struct { - // RagFile: Required. The RagFile to upload. - RagFile *GoogleCloudAiplatformV1RagFile `json:"ragFile,omitempty"` - // UploadRagFileConfig: Required. The config for the RagFiles to be uploaded - // into the RagCorpus. VertexRagDataService.UploadRagFile. - UploadRagFileConfig *GoogleCloudAiplatformV1UploadRagFileConfig `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. See +// GoogleCloudAiplatformV1TuningJob: Represents a TuningJob that runs with +// Google owned models. +type GoogleCloudAiplatformV1TuningJob struct { + // BaseModel: The base model that is being tuned, e.g., "gemini-1.0-pro-002". . + BaseModel string `json:"baseModel,omitempty"` + // CreateTime: Output only. Time when the TuningJob was created. + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. The description of the TuningJob. + Description string `json:"description,omitempty"` + // EncryptionSpec: Customer-managed encryption key options for a TuningJob. If + // this is set, then all resources created by the TuningJob will be encrypted + // with the provided encryption key. + EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` + // EndTime: Output only. Time when the TuningJob entered any of the following + // JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, + // `JOB_STATE_EXPIRED`. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. Only populated when job's state is `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + Error *GoogleRpcStatus `json:"error,omitempty"` + // Experiment: Output only. The Experiment associated with this TuningJob. + Experiment string `json:"experiment,omitempty"` + // Labels: Optional. The labels with user-defined metadata to organize + // TuningJob and generated resources such as Model and Endpoint. Label keys and + // values can be no longer than 64 characters (Unicode codepoints), can only + // contain lowercase letters, numeric characters, underscores and dashes. + // International characters are allowed. See https://goo.gl/xmQnxf for more + // information and examples of labels. + Labels map[string]string `json:"labels,omitempty"` + // Name: Output only. Identifier. Resource name of a TuningJob. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + Name string `json:"name,omitempty"` + // ServiceAccount: The service account that the tuningJob workload runs as. If + // not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project + // will be used. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent + // Users starting the pipeline must have the `iam.serviceAccounts.actAs` + // permission on this service account. + ServiceAccount string `json:"serviceAccount,omitempty"` + // StartTime: Output only. Time when the TuningJob for the first time entered + // the `JOB_STATE_RUNNING` state. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The detailed state of the job. + // + // Possible values: + // "JOB_STATE_UNSPECIFIED" - The job state is unspecified. + // "JOB_STATE_QUEUED" - The job has been just created or resumed and + // processing has not yet begun. + // "JOB_STATE_PENDING" - The service is preparing to run the job. + // "JOB_STATE_RUNNING" - The job is in progress. + // "JOB_STATE_SUCCEEDED" - The job completed successfully. + // "JOB_STATE_FAILED" - The job failed. + // "JOB_STATE_CANCELLING" - The job is being cancelled. From this state the + // job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + // "JOB_STATE_CANCELLED" - The job has been cancelled. + // "JOB_STATE_PAUSED" - The job has been stopped, and can be resumed. + // "JOB_STATE_EXPIRED" - The job has expired. + // "JOB_STATE_UPDATING" - The job is being updated. Only jobs in the + // `RUNNING` state can be updated. After updating, the job goes back to the + // `RUNNING` state. + // "JOB_STATE_PARTIALLY_SUCCEEDED" - The job is partially succeeded, some + // results may be missing due to errors. + State string `json:"state,omitempty"` + // SupervisedTuningSpec: Tuning Spec for Supervised Fine Tuning. + SupervisedTuningSpec *GoogleCloudAiplatformV1SupervisedTuningSpec `json:"supervisedTuningSpec,omitempty"` + // TunedModel: Output only. The tuned model resources assiociated with this + // TuningJob. + TunedModel *GoogleCloudAiplatformV1TunedModel `json:"tunedModel,omitempty"` + // TunedModelDisplayName: Optional. The display name of the TunedModel. The + // name can be up to 128 characters long and can consist of any UTF-8 + // characters. + TunedModelDisplayName string `json:"tunedModelDisplayName,omitempty"` + // TuningDataStats: Output only. The tuning data statistics associated with + // this TuningJob. + TuningDataStats *GoogleCloudAiplatformV1TuningDataStats `json:"tuningDataStats,omitempty"` + // UpdateTime: Output only. Time when the TuningJob was most recently 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. "BaseModel") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RagFile") to include in API + // NullFields is a list of field names (e.g. "BaseModel") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadRagFileRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadRagFileRequest +func (s GoogleCloudAiplatformV1TuningJob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TuningJob return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadRagFileResponse: Response message for -// VertexRagDataService.UploadRagFile. -type GoogleCloudAiplatformV1UploadRagFileResponse 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 *GoogleCloudAiplatformV1RagFile `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. See +// GoogleCloudAiplatformV1UndeployIndexOperationMetadata: Runtime operation +// information for IndexEndpointService.UndeployIndex. +type GoogleCloudAiplatformV1UndeployIndexOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. 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. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadRagFileResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadRagFileResponse +func (s GoogleCloudAiplatformV1UndeployIndexOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UndeployIndexOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpsertDatapointsRequest: Request message for -// IndexService.UpsertDatapoints -type GoogleCloudAiplatformV1UpsertDatapointsRequest struct { - // Datapoints: A list of datapoints to be created/updated. - Datapoints []*GoogleCloudAiplatformV1IndexDatapoint `json:"datapoints,omitempty"` - // UpdateMask: Optional. Update mask is used to specify the fields to be - // overwritten in the datapoints by the update. The fields specified in the - // update_mask are relative to each IndexDatapoint inside datapoints, not the - // full request. Updatable fields: * Use `all_restricts` to update both - // restricts and numeric_restricts. - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Datapoints") to +// GoogleCloudAiplatformV1UndeployIndexRequest: Request message for +// IndexEndpointService.UndeployIndex. +type GoogleCloudAiplatformV1UndeployIndexRequest struct { + // DeployedIndexId: Required. The ID of the DeployedIndex to be undeployed from + // the IndexEndpoint. + DeployedIndexId string `json:"deployedIndexId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeployedIndexId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Datapoints") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "DeployedIndexId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpsertDatapointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpsertDatapointsRequest +func (s GoogleCloudAiplatformV1UndeployIndexRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UndeployIndexRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpsertDatapointsResponse: Response message for -// IndexService.UpsertDatapoints -type GoogleCloudAiplatformV1UpsertDatapointsResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudAiplatformV1UndeployIndexResponse: Response message for +// IndexEndpointService.UndeployIndex. +type GoogleCloudAiplatformV1UndeployIndexResponse struct { } -// GoogleCloudAiplatformV1UserActionReference: References an API call. It -// contains more information about long running operation and Jobs that are -// triggered by the API call. -type GoogleCloudAiplatformV1UserActionReference struct { - // DataLabelingJob: For API calls that start a LabelingJob. Resource name of - // the LabelingJob. Format: - // `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} - // ` - DataLabelingJob string `json:"dataLabelingJob,omitempty"` - // Method: The method name of the API RPC call. For example, - // "/google.cloud.aiplatform.{apiVersion}.DatasetService.CreateDataset" - Method string `json:"method,omitempty"` - // Operation: For API calls that return a long running operation. Resource name - // of the long running operation. Format: - // `projects/{project}/locations/{location}/operations/{operation}` - Operation string `json:"operation,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataLabelingJob") to +// GoogleCloudAiplatformV1UndeployModelOperationMetadata: Runtime operation +// information for EndpointService.UndeployModel. +type GoogleCloudAiplatformV1UndeployModelOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataLabelingJob") to include in + // NullFields is a list of field names (e.g. "GenericMetadata") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UserActionReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UserActionReference +func (s GoogleCloudAiplatformV1UndeployModelOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UndeployModelOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1Value: Value is the value of the field. -type GoogleCloudAiplatformV1Value struct { - // DoubleValue: A double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - // IntValue: An integer value. - IntValue int64 `json:"intValue,omitempty,string"` - // StringValue: A string value. - StringValue string `json:"stringValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "DoubleValue") to +// GoogleCloudAiplatformV1UndeployModelRequest: Request message for +// EndpointService.UndeployModel. +type GoogleCloudAiplatformV1UndeployModelRequest struct { + // DeployedModelId: Required. The ID of the DeployedModel to be undeployed from + // the Endpoint. + DeployedModelId string `json:"deployedModelId,omitempty"` + // TrafficSplit: If this field is provided, then the Endpoint's traffic_split + // will be overwritten with it. If last DeployedModel is being undeployed from + // the Endpoint, the [Endpoint.traffic_split] will always end up empty when + // this call returns. A DeployedModel will be successfully undeployed only if + // it doesn't have any traffic assigned to it when this method executes, or if + // this field unassigns any traffic to it. + TrafficSplit map[string]int64 `json:"trafficSplit,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeployedModelId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DoubleValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "DeployedModelId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1Value) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1Value +func (s GoogleCloudAiplatformV1UndeployModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UndeployModelRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudAiplatformV1Value) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1Value - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil +// GoogleCloudAiplatformV1UndeployModelResponse: Response message for +// EndpointService.UndeployModel. +type GoogleCloudAiplatformV1UndeployModelResponse struct { } -// GoogleCloudAiplatformV1VertexAISearch: Retrieve from Vertex AI Search -// datastore for grounding. See https://cloud.google.com/products/agent-builder -type GoogleCloudAiplatformV1VertexAISearch struct { - // Datastore: Required. Fully-qualified Vertex AI Search data store resource - // ID. Format: - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {dataStore}` - Datastore string `json:"datastore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Datastore") to +// GoogleCloudAiplatformV1UnmanagedContainerModel: Contains model information +// necessary to perform batch prediction without requiring a full model import. +type GoogleCloudAiplatformV1UnmanagedContainerModel struct { + // ArtifactUri: The path to the directory containing the Model artifact and any + // of its supporting files. + ArtifactUri string `json:"artifactUri,omitempty"` + // ContainerSpec: Input only. The specification of the container that is to be + // used when deploying this Model. + ContainerSpec *GoogleCloudAiplatformV1ModelContainerSpec `json:"containerSpec,omitempty"` + // PredictSchemata: Contains the schemata used in Model's predictions and + // explanations + PredictSchemata *GoogleCloudAiplatformV1PredictSchemata `json:"predictSchemata,omitempty"` + // ForceSendFields is a list of field names (e.g. "ArtifactUri") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Datastore") to include in API + // NullFields is a list of field names (e.g. "ArtifactUri") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1VertexAISearch) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1VertexAISearch +func (s GoogleCloudAiplatformV1UnmanagedContainerModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UnmanagedContainerModel return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1VertexRagStore: Retrieve from Vertex RAG Store for -// grounding. -type GoogleCloudAiplatformV1VertexRagStore struct { - // RagResources: Optional. The representation of the rag source. It can be used - // to specify corpus only or ragfiles. Currently only support one corpus or - // multiple files from one corpus. In the future we may open up multiple - // corpora support. - RagResources []*GoogleCloudAiplatformV1VertexRagStoreRagResource `json:"ragResources,omitempty"` - // RagRetrievalConfig: Optional. The retrieval config for the Rag query. - RagRetrievalConfig *GoogleCloudAiplatformV1RagRetrievalConfig `json:"ragRetrievalConfig,omitempty"` - // SimilarityTopK: Optional. Number of top k results to return from the - // selected corpora. - SimilarityTopK int64 `json:"similarityTopK,omitempty"` - // VectorDistanceThreshold: Optional. Only return results with vector distance - // smaller than the threshold. - VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "RagResources") to +// GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata: +// Runtime operation information for UpdateDeploymentResourcePool method. +type GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RagResources") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1VertexRagStore) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1VertexRagStore +func (s GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudAiplatformV1VertexRagStore) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1VertexRagStore - var s1 struct { - VectorDistanceThreshold gensupport.JSONFloat64 `json:"vectorDistanceThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.VectorDistanceThreshold = float64(s1.VectorDistanceThreshold) - return nil -} - -// GoogleCloudAiplatformV1VertexRagStoreRagResource: The definition of the Rag -// resource. -type GoogleCloudAiplatformV1VertexRagStoreRagResource struct { - // RagCorpus: Optional. RagCorpora resource name. Format: - // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` - RagCorpus string `json:"ragCorpus,omitempty"` - // RagFileIds: Optional. rag_file_id. The files should be in the same - // rag_corpus set in rag_corpus field. - RagFileIds []string `json:"ragFileIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "RagCorpus") to +// GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest: Request message for +// EndpointService.UpdateEndpointLongRunning. +type GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest struct { + // Endpoint: Required. The Endpoint which replaces the resource on the server. + // Currently we only support updating the `client_connection_config` field, all + // the other fields' update will be blocked. + Endpoint *GoogleCloudAiplatformV1Endpoint `json:"endpoint,omitempty"` + // ForceSendFields is a list of field names (e.g. "Endpoint") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RagCorpus") to include in API + // NullFields is a list of field names (e.g. "Endpoint") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1VertexRagStoreRagResource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1VertexRagStoreRagResource +func (s GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1VideoMetadata: Metadata describes the input video -// content. -type GoogleCloudAiplatformV1VideoMetadata struct { - // EndOffset: Optional. The end offset of the video. - EndOffset string `json:"endOffset,omitempty"` - // StartOffset: Optional. The start offset of the video. - StartOffset string `json:"startOffset,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndOffset") to +// GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata: Runtime +// operation information for ModelService.UpdateExplanationDataset. +type GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata struct { + // GenericMetadata: The common part of the operation metadata. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndOffset") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1VideoMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1VideoMetadata +func (s GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WorkerPoolSpec: Represents the spec of a worker pool -// in a job. -type GoogleCloudAiplatformV1WorkerPoolSpec struct { - // ContainerSpec: The custom container task. - ContainerSpec *GoogleCloudAiplatformV1ContainerSpec `json:"containerSpec,omitempty"` - // DiskSpec: Disk spec. - DiskSpec *GoogleCloudAiplatformV1DiskSpec `json:"diskSpec,omitempty"` - // MachineSpec: Optional. Immutable. The specification of a single machine. - MachineSpec *GoogleCloudAiplatformV1MachineSpec `json:"machineSpec,omitempty"` - // NfsMounts: Optional. List of NFS mount spec. - NfsMounts []*GoogleCloudAiplatformV1NfsMount `json:"nfsMounts,omitempty"` - // PythonPackageSpec: The Python packaged task. - PythonPackageSpec *GoogleCloudAiplatformV1PythonPackageSpec `json:"pythonPackageSpec,omitempty"` - // ReplicaCount: Optional. The number of worker replicas to use for this worker - // pool. - ReplicaCount int64 `json:"replicaCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ContainerSpec") to +// GoogleCloudAiplatformV1UpdateExplanationDatasetRequest: Request message for +// ModelService.UpdateExplanationDataset. +type GoogleCloudAiplatformV1UpdateExplanationDatasetRequest struct { + // Examples: The example config containing the location of the dataset. + Examples *GoogleCloudAiplatformV1Examples `json:"examples,omitempty"` + // ForceSendFields is a list of field names (e.g. "Examples") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerSpec") to include in API + // NullFields is a list of field names (e.g. "Examples") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WorkerPoolSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WorkerPoolSpec +func (s GoogleCloudAiplatformV1UpdateExplanationDatasetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateExplanationDatasetRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteFeatureValuesPayload: Contains Feature values to -// be written for a specific entity. -type GoogleCloudAiplatformV1WriteFeatureValuesPayload struct { - // EntityId: Required. The ID of the entity. - EntityId string `json:"entityId,omitempty"` - // FeatureValues: Required. Feature values to be written, mapping from Feature - // ID to value. Up to 100,000 `feature_values` entries may be written across - // all payloads. The feature generation time, aligned by days, must be no older - // than five years (1825 days) and no later than one year (366 days) in the - // future. - FeatureValues map[string]GoogleCloudAiplatformV1FeatureValue `json:"featureValues,omitempty"` - // ForceSendFields is a list of field names (e.g. "EntityId") to +// GoogleCloudAiplatformV1UpdateExplanationDatasetResponse: Response message of +// ModelService.UpdateExplanationDataset operation. +type GoogleCloudAiplatformV1UpdateExplanationDatasetResponse struct { +} + +// GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata: Details of +// operations that perform update FeatureGroup. +type GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata struct { + // GenericMetadata: Operation metadata for FeatureGroup. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EntityId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WriteFeatureValuesPayload) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WriteFeatureValuesPayload +func (s GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteFeatureValuesRequest: Request message for -// FeaturestoreOnlineServingService.WriteFeatureValues. -type GoogleCloudAiplatformV1WriteFeatureValuesRequest struct { - // Payloads: Required. The entities to be written. Up to 100,000 feature values - // can be written across all `payloads`. - Payloads []*GoogleCloudAiplatformV1WriteFeatureValuesPayload `json:"payloads,omitempty"` - // ForceSendFields is a list of field names (e.g. "Payloads") to +// GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata: Details of +// operations that perform update FeatureOnlineStore. +type GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata struct { + // GenericMetadata: Operation metadata for FeatureOnlineStore. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Payloads") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WriteFeatureValuesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WriteFeatureValuesRequest +func (s GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteFeatureValuesResponse: Response message for -// FeaturestoreOnlineServingService.WriteFeatureValues. -type GoogleCloudAiplatformV1WriteFeatureValuesResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest: Request -// message for TensorboardService.WriteTensorboardExperimentData. -type GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest struct { - // WriteRunDataRequests: Required. Requests containing per-run - // TensorboardTimeSeries data to write. - WriteRunDataRequests []*GoogleCloudAiplatformV1WriteTensorboardRunDataRequest `json:"writeRunDataRequests,omitempty"` - // ForceSendFields is a list of field names (e.g. "WriteRunDataRequests") to +// GoogleCloudAiplatformV1UpdateFeatureOperationMetadata: Details of operations +// that perform update Feature. +type GoogleCloudAiplatformV1UpdateFeatureOperationMetadata struct { + // GenericMetadata: Operation metadata for Feature Update. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WriteRunDataRequests") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest +func (s GoogleCloudAiplatformV1UpdateFeatureOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeatureOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteTensorboardExperimentDataResponse: Response -// message for TensorboardService.WriteTensorboardExperimentData. -type GoogleCloudAiplatformV1WriteTensorboardExperimentDataResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleCloudAiplatformV1WriteTensorboardRunDataRequest: Request message for -// TensorboardService.WriteTensorboardRunData. -type GoogleCloudAiplatformV1WriteTensorboardRunDataRequest struct { - // TensorboardRun: Required. The resource name of the TensorboardRun to write - // data to. Format: - // `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experimen - // ts/{experiment}/runs/{run}` - TensorboardRun string `json:"tensorboardRun,omitempty"` - // TimeSeriesData: Required. The TensorboardTimeSeries data to write. Values - // with in a time series are indexed by their step value. Repeated writes to - // the same step will overwrite the existing value for that step. The upper - // limit of data points per write request is 5000. - TimeSeriesData []*GoogleCloudAiplatformV1TimeSeriesData `json:"timeSeriesData,omitempty"` - // ForceSendFields is a list of field names (e.g. "TensorboardRun") to +// GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata: Details of +// operations that perform update FeatureView. +type GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata struct { + // GenericMetadata: Operation metadata for FeatureView Update. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TensorboardRun") to include in + // NullFields is a list of field names (e.g. "GenericMetadata") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WriteTensorboardRunDataRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WriteTensorboardRunDataRequest +func (s GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteTensorboardRunDataResponse: Response message for -// TensorboardService.WriteTensorboardRunData. -type GoogleCloudAiplatformV1WriteTensorboardRunDataResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleCloudAiplatformV1XraiAttribution: An explanation method that -// redistributes Integrated Gradients attributions to segmented regions, taking -// advantage of the model's fully differentiable structure. Refer to this paper -// for more details: https://arxiv.org/abs/1906.02825 Supported only by image -// Models. -type GoogleCloudAiplatformV1XraiAttribution struct { - // BlurBaselineConfig: Config for XRAI with blur baseline. When enabled, a - // linear path from the maximally blurred image to the input image is created. - // Using a blurred baseline instead of zero (black image) is motivated by the - // BlurIG approach explained here: https://arxiv.org/abs/2004.03383 - BlurBaselineConfig *GoogleCloudAiplatformV1BlurBaselineConfig `json:"blurBaselineConfig,omitempty"` - // SmoothGradConfig: Config for SmoothGrad approximation of gradients. When - // enabled, the gradients are approximated by averaging the gradients from - // noisy samples in the vicinity of the inputs. Adding noise can help improve - // the computed gradients. Refer to this paper for more details: - // https://arxiv.org/pdf/1706.03825.pdf - SmoothGradConfig *GoogleCloudAiplatformV1SmoothGradConfig `json:"smoothGradConfig,omitempty"` - // StepCount: Required. The number of steps for approximating the path - // integral. A good value to start is 50 and gradually increase until the sum - // to diff property is met within the desired error range. Valid range of its - // value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlurBaselineConfig") to +// GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata: Details of +// operations that perform update Featurestore. +type GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata struct { + // GenericMetadata: Operation metadata for Featurestore. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlurBaselineConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1XraiAttribution) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1XraiAttribution +func (s GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudLocationListLocationsResponse: The response message for -// Locations.ListLocations. -type GoogleCloudLocationListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in the - // request. - Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` - // NextPageToken: The standard List next-page token. - 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. "Locations") to +// GoogleCloudAiplatformV1UpdateIndexOperationMetadata: Runtime operation +// information for IndexService.UpdateIndex. +type GoogleCloudAiplatformV1UpdateIndexOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // NearestNeighborSearchOperationMetadata: The operation metadata with regard + // to Matching Engine Index operation. + NearestNeighborSearchOperationMetadata *GoogleCloudAiplatformV1NearestNeighborSearchOperationMetadata `json:"nearestNeighborSearchOperationMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudLocationListLocationsResponse +func (s GoogleCloudAiplatformV1UpdateIndexOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateIndexOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudLocationLocation: A resource that represents a Google Cloud -// location. -type GoogleCloudLocationLocation struct { - // DisplayName: The friendly name for this location, typically a nearby city - // name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - // LocationId: The canonical id for this location. For example: "us-east1". - LocationId string `json:"locationId,omitempty"` - // Metadata: Service-specific metadata. For example the available capacity at - // the given location. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Resource name for the location, which may vary between - // implementations. For example: - // "projects/example-project/locations/us-east1" - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to +// GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata: +// Runtime operation information for +// JobService.UpdateModelDeploymentMonitoringJob. +type GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudLocationLocation +func (s GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleIamV1Binding: Associates `members`, or principals, with a `role`. -type GoogleIamV1Binding struct { - // Condition: The condition that is associated with this binding. If the - // condition evaluates to `true`, then this binding applies to the current - // request. If the condition evaluates to `false`, then this binding does not - // apply to the current request. However, a different role binding might grant - // the same role to one or more of the principals in this binding. To learn - // which resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Condition *GoogleTypeExpr `json:"condition,omitempty"` - // Members: Specifies the principals requesting access for a Google Cloud - // resource. `members` can have the following values: * `allUsers`: A special - // identifier that represents anyone who is on the internet; with or without a - // Google account. * `allAuthenticatedUsers`: A special identifier that - // represents anyone who is authenticated with a Google account or a service - // account. Does not include identities that come from external identity - // providers (IdPs) through identity federation. * `user:{emailid}`: An email - // address that represents a specific Google account. For example, - // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that - // represents a Google service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. * - // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An - // identifier for a Kubernetes service account - // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). - // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * - // `group:{emailid}`: An email address that represents a Google group. For - // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain - // (primary) that represents all the users of that domain. For example, - // `google.com` or `example.com`. * - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub - // ject/{subject_attribute_value}`: A single identity in a workforce identity - // pool. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // group/{group_id}`: All workforce identities in a group. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // attribute.{attribute_name}/{attribute_value}`: All workforce identities with - // a specific attribute value. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // *`: All identities in a workforce identity pool. * - // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo - // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single - // identity in a workload identity pool. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool - // group. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} - // `: All identities in a workload identity pool with a certain attribute. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity - // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus - // unique identifier) representing a user that has been recently deleted. For - // example, `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered user - // retains the role in the binding. * - // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - // unique identifier) representing a service account that has been recently - // deleted. For example, - // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the - // service account is undeleted, this value reverts to - // `serviceAccount:{emailid}` and the undeleted service account retains the - // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email - // address (plus unique identifier) representing a Google group that has been - // recently deleted. For example, - // `admins@example.com?uid=123456789012345678901`. If the group is recovered, - // this value reverts to `group:{emailid}` and the recovered group retains the - // role in the binding. * - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool - // _id}/subject/{subject_attribute_value}`: Deleted single identity in a - // workforce identity pool. For example, - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po - // ol-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. For - // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview - // of the IAM roles and permissions, see the IAM documentation - // (https://cloud.google.com/iam/docs/roles-overview). For a list of the - // available pre-defined roles, see here - // (https://cloud.google.com/iam/docs/understanding-roles). - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to +// GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata: Details of +// operations that perform update PersistentResource. +type GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata struct { + // GenericMetadata: Operation metadata for PersistentResource. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ProgressMessage: Progress Message for Update LRO + ProgressMessage string `json:"progressMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleIamV1Binding) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Binding +func (s GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, which -// specifies access controls for Google Cloud resources. A `Policy` is a -// collection of `bindings`. A `binding` binds one or more `members`, or -// principals, to a single `role`. Principals can be user accounts, service -// accounts, Google groups, and domains (such as G Suite). A `role` is a named -// list of permissions; each `role` can be an IAM predefined role or a -// user-created custom role. For some types of Google Cloud resources, a -// `binding` can also specify a `condition`, which is a logical expression that -// allows access to a resource only if the expression evaluates to `true`. A -// condition can add constraints based on attributes of the request, the -// resource, or both. To learn which resources support conditions in their IAM -// policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON -// example:** ``` { "bindings": [ { "role": -// "roles/resourcemanager.organizationAdmin", "members": [ -// "user:mike@example.com", "group:admins@example.com", "domain:google.com", -// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": -// "roles/resourcemanager.organizationViewer", "members": [ -// "user:eve@example.com" ], "condition": { "title": "expirable access", -// "description": "Does not grant access after Sep 2020", "expression": -// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": -// "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com -// role: roles/resourcemanager.organizationAdmin - members: - -// user:eve@example.com role: roles/resourcemanager.organizationViewer -// condition: title: expirable access description: Does not grant access after -// Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') -// etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, -// see the IAM documentation (https://cloud.google.com/iam/docs/). -type GoogleIamV1Policy struct { - // Bindings: Associates a list of `members`, or principals, with a `role`. - // Optionally, may specify a `condition` that determines how and when the - // `bindings` are applied. Each of the `bindings` must contain at least one - // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; - // up to 250 of these principals can be Google groups. Each occurrence of a - // principal counts towards these limits. For example, if the `bindings` grant - // 50 different roles to `user:alice@example.com`, and not to any other - // principal, then you can add another 1,450 principals to the `bindings` in - // the `Policy`. - Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` - // Etag: `etag` is used for optimistic concurrency control as a way to help - // prevent simultaneous updates of a policy from overwriting each other. It is - // strongly suggested that systems make use of the `etag` in the - // read-modify-write cycle to perform policy updates in order to avoid race - // conditions: An `etag` is returned in the response to `getIamPolicy`, and - // systems are expected to put that etag in the request to `setIamPolicy` to - // ensure that their change will be applied to the same version of the policy. - // **Important:** If you use IAM Conditions, you must include the `etag` field - // whenever you call `setIamPolicy`. If you omit this field, then IAM allows - // you to overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` - // Version: Specifies the format of the policy. Valid values are `0`, `1`, and - // `3`. Requests that specify an invalid value are rejected. Any operation that - // affects conditional role bindings must specify version `3`. This requirement - // applies to the following operations: * Getting a policy that includes a - // conditional role binding * Adding a conditional role binding to a policy * - // Changing a conditional role binding in a policy * Removing any role binding, - // with or without a condition, from a policy that includes conditions - // **Important:** If you use IAM Conditions, you must include the `etag` field - // whenever you call `setIamPolicy`. If you omit this field, then IAM allows - // you to overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. If a policy does not - // include any conditions, operations on that policy may specify any valid - // version or leave the field unset. To learn which resources support - // conditions in their IAM policies, see the IAM documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Bindings") to +// GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata: Runtime +// operation metadata for SpecialistPoolService.UpdateSpecialistPool. +type GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // SpecialistPool: Output only. The name of the SpecialistPool to which the + // specialists are being added. Format: + // `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_po + // ol}` + SpecialistPool string `json:"specialistPool,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleIamV1Policy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Policy +func (s GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type GoogleIamV1SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the `resource`. The - // size of the policy is limited to a few 10s of KB. An empty policy is a valid - // policy but certain Google Cloud services (such as Projects) might reject - // them. - Policy *GoogleIamV1Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata: Details of +// operations that perform update Tensorboard. +type GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata struct { + // GenericMetadata: Operation metadata for Tensorboard. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1SetIamPolicyRequest +func (s GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleIamV1TestIamPermissionsResponse: Response message for -// `TestIamPermissions` method. -type GoogleIamV1TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that the - // caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Permissions") to +// GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata: Metadata +// information for NotebookService.UpgradeNotebookRuntime. +type GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ProgressMessage: A human-readable message that shows the intermediate + // progress details of NotebookRuntime. + ProgressMessage string `json:"progressMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1TestIamPermissionsResponse +func (s GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - // Operations: A list of operations that matches the specified filter in the - // request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` +// GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest: Request message for +// NotebookService.UpgradeNotebookRuntime. +type GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest struct { +} - // 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 +// GoogleCloudAiplatformV1UploadModelOperationMetadata: Details of +// ModelService.UploadModel operation. +type GoogleCloudAiplatformV1UploadModelOperationMetadata struct { + // GenericMetadata: The common part of the operation metadata. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1UploadModelOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadModelOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1UploadModelRequest: Request message for +// ModelService.UploadModel. +type GoogleCloudAiplatformV1UploadModelRequest struct { + // Model: Required. The Model to create. + Model *GoogleCloudAiplatformV1Model `json:"model,omitempty"` + // ModelId: Optional. The ID to use for the uploaded Model, which will become + // the final component of the model resource name. This value may be up to 63 + // characters, and valid characters are `[a-z0-9_-]`. The first character + // cannot be a number or hyphen. + ModelId string `json:"modelId,omitempty"` + // ParentModel: Optional. The resource name of the model into which to upload + // the version. Only specify this field when uploading a new version. + ParentModel string `json:"parentModel,omitempty"` + // ServiceAccount: Optional. The user-provided custom service account to use to + // do the model upload. If empty, Vertex AI Service Agent + // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + // will be used to access resources needed to upload the model. This account + // must belong to the target project where the model is uploaded to, i.e., the + // project specified in the `parent` field of this request and have necessary + // read permissions (to Google Cloud Storage, Artifact Registry, etc.). + ServiceAccount string `json:"serviceAccount,omitempty"` + // ForceSendFields is a list of field names (e.g. "Model") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Model") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s GoogleCloudAiplatformV1UploadModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadModelRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation struct { - // Done: If the value is `false`, it means the operation is still in progress. - // If `true`, the operation is completed, and either `error` or `response` is - // available. - Done bool `json:"done,omitempty"` - // Error: The error result of the operation in case of failure or cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as create - // time. Some services might not provide such metadata. Any method that returns - // a long-running operation should document the metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: The server-assigned name, which is only unique within the same service - // that originally returns it. If you use the default HTTP mapping, the `name` - // should be a resource name ending with `operations/{unique_id}`. - Name string `json:"name,omitempty"` - // Response: The normal, successful response of the operation. If the original - // method returns no data on success, such as `Delete`, the response is - // `google.protobuf.Empty`. If the original method is standard - // `Get`/`Create`/`Update`, the response should be the resource. For other - // methods, the response should have the type `XxxResponse`, where `Xxx` is the - // original method name. For example, if the original method name is - // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Done") to unconditionally +// GoogleCloudAiplatformV1UploadModelResponse: Response message of +// ModelService.UploadModel operation. +type GoogleCloudAiplatformV1UploadModelResponse struct { + // Model: The name of the uploaded Model resource. Format: + // `projects/{project}/locations/{location}/models/{model}` + Model string `json:"model,omitempty"` + // ModelVersionId: Output only. The version ID of the model that is uploaded. + ModelVersionId string `json:"modelVersionId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Model") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s GoogleCloudAiplatformV1UploadModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadModelResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleProtobufEmpty: A generic empty message that you can re-use to avoid -// defining duplicated empty messages in your APIs. A typical example is to use -// it as the request or the response type of an API method. For instance: -// service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } -type GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudAiplatformV1UploadRagFileConfig: Config for uploading RagFile. +type GoogleCloudAiplatformV1UploadRagFileConfig struct { + // RagFileTransformationConfig: Specifies the transformation config for + // RagFiles. + RagFileTransformationConfig *GoogleCloudAiplatformV1RagFileTransformationConfig `json:"ragFileTransformationConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RagFileTransformationConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RagFileTransformationConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleRpcStatus: The `Status` type defines a logical error model that is -// suitable for different programming environments, including REST APIs and RPC -// APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message -// contains three pieces of data: error code, error message, and error details. -// You can find out more about this error model and how to work with it in the -// API Design Guide (https://cloud.google.com/apis/design/errors). -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of google.rpc.Code. - Code int64 `json:"code,omitempty"` - // Details: A list of messages that carry the error details. There is a common - // set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - // Message: A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to unconditionally +func (s GoogleCloudAiplatformV1UploadRagFileConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadRagFileConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1UploadRagFileRequest: Request message for +// VertexRagDataService.UploadRagFile. +type GoogleCloudAiplatformV1UploadRagFileRequest struct { + // RagFile: Required. The RagFile to upload. + RagFile *GoogleCloudAiplatformV1RagFile `json:"ragFile,omitempty"` + // UploadRagFileConfig: Required. The config for the RagFiles to be uploaded + // into the RagCorpus. VertexRagDataService.UploadRagFile. + UploadRagFileConfig *GoogleCloudAiplatformV1UploadRagFileConfig `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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s GoogleCloudAiplatformV1UploadRagFileRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadRagFileRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypeColor: Represents a color in the RGBA color space. This -// representation is designed for simplicity of conversion to and from color -// representations in various languages over compactness. For example, the -// fields of this representation can be trivially provided to the constructor -// of `java.awt.Color` in Java; it can also be trivially provided to UIColor's -// `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little -// work, it can be easily formatted into a CSS `rgba()` string in JavaScript. -// This reference page doesn't have information about the absolute color space -// that should be used to interpret the RGB value—for example, sRGB, Adobe -// RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB -// color space. When color equality needs to be decided, implementations, -// unless documented otherwise, treat two colors as equal if all their red, -// green, blue, and alpha values each differ by at most `1e-5`. Example (Java): -// import com.google.type.Color; // ... public static java.awt.Color -// fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? -// protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( -// protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } -// public static Color toProto(java.awt.Color color) { float red = (float) -// color.getRed(); float green = (float) color.getGreen(); float blue = (float) -// color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = -// Color .newBuilder() .setRed(red / denominator) .setGreen(green / -// denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if -// (alpha != 255) { result.setAlpha( FloatValue .newBuilder() -// .setValue(((float) alpha) / denominator) .build()); } return -// resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static -// UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float -// green = [protocolor green]; float blue = [protocolor blue]; FloatValue* -// alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != -// nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red -// green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) -// { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green -// blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] -// init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; -// if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } -// [result autorelease]; return result; } // ... Example (JavaScript): // ... -// var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || -// 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue -// || 0.0; var red = Math.floor(redFrac * 255); var green = -// Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if -// (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var -// alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, -// blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); -// }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new -// Number((red << 16) | (green << 8) | blue); var hexString = -// rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var -// resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { -// resultBuilder.push('0'); } resultBuilder.push(hexString); return -// resultBuilder.join(”); }; // ... -type GoogleTypeColor struct { - // Alpha: The fraction of this color that should be applied to the pixel. That - // is, the final pixel color is defined by the equation: `pixel color = alpha * - // (this color) + (1.0 - alpha) * (background color)` This means that a value - // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a - // completely transparent color. This uses a wrapper message rather than a - // simple float scalar so that it is possible to distinguish between a default - // value and the value being unset. If omitted, this color object is rendered - // as a solid color (as if the alpha value had been explicitly given a value of - // 1.0). - Alpha float64 `json:"alpha,omitempty"` - // Blue: The amount of blue in the color as a value in the interval [0, 1]. - Blue float64 `json:"blue,omitempty"` - // Green: The amount of green in the color as a value in the interval [0, 1]. - Green float64 `json:"green,omitempty"` - // Red: The amount of red in the color as a value in the interval [0, 1]. - Red float64 `json:"red,omitempty"` - // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally +// GoogleCloudAiplatformV1UploadRagFileResponse: Response message for +// VertexRagDataService.UploadRagFile. +type GoogleCloudAiplatformV1UploadRagFileResponse 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 *GoogleCloudAiplatformV1RagFile `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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Alpha") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeColor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeColor +func (s GoogleCloudAiplatformV1UploadRagFileResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadRagFileResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error { - type NoMethod GoogleTypeColor +// GoogleCloudAiplatformV1UpsertDatapointsRequest: Request message for +// IndexService.UpsertDatapoints +type GoogleCloudAiplatformV1UpsertDatapointsRequest struct { + // Datapoints: A list of datapoints to be created/updated. + Datapoints []*GoogleCloudAiplatformV1IndexDatapoint `json:"datapoints,omitempty"` + // UpdateMask: Optional. Update mask is used to specify the fields to be + // overwritten in the datapoints by the update. The fields specified in the + // update_mask are relative to each IndexDatapoint inside datapoints, not the + // full request. Updatable fields: * Use `all_restricts` to update both + // restricts and numeric_restricts. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Datapoints") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Datapoints") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1UpsertDatapointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpsertDatapointsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1UpsertDatapointsResponse: Response message for +// IndexService.UpsertDatapoints +type GoogleCloudAiplatformV1UpsertDatapointsResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudAiplatformV1UserActionReference: References an API call. It +// contains more information about long running operation and Jobs that are +// triggered by the API call. +type GoogleCloudAiplatformV1UserActionReference struct { + // DataLabelingJob: For API calls that start a LabelingJob. Resource name of + // the LabelingJob. Format: + // `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} + // ` + DataLabelingJob string `json:"dataLabelingJob,omitempty"` + // Method: The method name of the API RPC call. For example, + // "/google.cloud.aiplatform.{apiVersion}.DatasetService.CreateDataset" + Method string `json:"method,omitempty"` + // Operation: For API calls that return a long running operation. Resource name + // of the long running operation. Format: + // `projects/{project}/locations/{location}/operations/{operation}` + Operation string `json:"operation,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataLabelingJob") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataLabelingJob") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1UserActionReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UserActionReference + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1Value: Value is the value of the field. +type GoogleCloudAiplatformV1Value struct { + // DoubleValue: A double value. + DoubleValue float64 `json:"doubleValue,omitempty"` + // IntValue: An integer value. + IntValue int64 `json:"intValue,omitempty,string"` + // StringValue: A string value. + StringValue string `json:"stringValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "DoubleValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DoubleValue") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1Value) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Value + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1Value) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1Value var s1 struct { - Alpha gensupport.JSONFloat64 `json:"alpha"` - Blue gensupport.JSONFloat64 `json:"blue"` - Green gensupport.JSONFloat64 `json:"green"` - Red gensupport.JSONFloat64 `json:"red"` + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.Alpha = float64(s1.Alpha) - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) + s.DoubleValue = float64(s1.DoubleValue) return nil } -// GoogleTypeDate: Represents a whole or partial calendar date, such as a -// birthday. The time of day and time zone are either specified elsewhere or -// are insignificant. The date is relative to the Gregorian Calendar. This can -// represent one of the following: * A full date, with non-zero year, month, -// and day values. * A month and day, with a zero year (for example, an -// anniversary). * A year on its own, with a zero month and a zero day. * A -// year and month, with a zero day (for example, a credit card expiration -// date). Related types: * google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, - // or 0 to specify a year by itself or a year and month where the day isn't - // significant. - Day int64 `json:"day,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without - // a month and day. - Month int64 `json:"month,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date - // without a year. - Year int64 `json:"year,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to unconditionally - // include in API requests. By default, fields with empty or default values are +// GoogleCloudAiplatformV1VertexAISearch: Retrieve from Vertex AI Search +// datastore for grounding. See https://cloud.google.com/products/agent-builder +type GoogleCloudAiplatformV1VertexAISearch struct { + // Datastore: Required. Fully-qualified Vertex AI Search data store resource + // ID. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {dataStore}` + Datastore string `json:"datastore,omitempty"` + // ForceSendFields is a list of field names (e.g. "Datastore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Datastore") to include in API + // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VertexAISearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexAISearch + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1VertexRagStore: Retrieve from Vertex RAG Store for +// grounding. +type GoogleCloudAiplatformV1VertexRagStore struct { + // RagResources: Optional. The representation of the rag source. It can be used + // to specify corpus only or ragfiles. Currently only support one corpus or + // multiple files from one corpus. In the future we may open up multiple + // corpora support. + RagResources []*GoogleCloudAiplatformV1VertexRagStoreRagResource `json:"ragResources,omitempty"` + // RagRetrievalConfig: Optional. The retrieval config for the Rag query. + RagRetrievalConfig *GoogleCloudAiplatformV1RagRetrievalConfig `json:"ragRetrievalConfig,omitempty"` + // SimilarityTopK: Optional. Number of top k results to return from the + // selected corpora. + SimilarityTopK int64 `json:"similarityTopK,omitempty"` + // VectorDistanceThreshold: Optional. Only return results with vector distance + // smaller than the threshold. + VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagResources") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "RagResources") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s GoogleCloudAiplatformV1VertexRagStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexRagStore return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypeExpr: Represents a textual expression in the Common Expression -// Language (CEL) syntax. CEL is a C-like expression language. The syntax and -// semantics of CEL are documented at https://github.com/google/cel-spec. -// Example (Comparison): title: "Summary size limit" description: "Determines -// if a summary is less than 100 chars" expression: "document.summary.size() < -// 100" Example (Equality): title: "Requestor is owner" description: -// "Determines if requestor is the document owner" expression: "document.owner -// == request.auth.claims.email" Example (Logic): title: "Public documents" -// description: "Determine whether the document should be publicly visible" -// expression: "document.type != 'private' && document.type != 'internal'" -// Example (Data Manipulation): title: "Notification string" description: -// "Create a notification string with a timestamp." expression: "'New message -// received at ' + string(document.create_time)" The exact variables and -// functions that may be referenced within an expression are determined by the -// service that evaluates it. See the service documentation for additional -// information. -type GoogleTypeExpr struct { - // Description: Optional. Description of the expression. This is a longer text - // which describes the expression, e.g. when hovered over it in a UI. - Description string `json:"description,omitempty"` - // Expression: Textual representation of an expression in Common Expression - // Language syntax. - Expression string `json:"expression,omitempty"` - // Location: Optional. String indicating the location of the expression for - // error reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` - // Title: Optional. Title for the expression, i.e. a short string describing - // its purpose. This can be used e.g. in UIs which allow to enter the - // expression. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to +func (s *GoogleCloudAiplatformV1VertexRagStore) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1VertexRagStore + var s1 struct { + VectorDistanceThreshold gensupport.JSONFloat64 `json:"vectorDistanceThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.VectorDistanceThreshold = float64(s1.VectorDistanceThreshold) + return nil +} + +// GoogleCloudAiplatformV1VertexRagStoreRagResource: The definition of the Rag +// resource. +type GoogleCloudAiplatformV1VertexRagStoreRagResource struct { + // RagCorpus: Optional. RagCorpora resource name. Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + RagCorpus string `json:"ragCorpus,omitempty"` + // RagFileIds: Optional. rag_file_id. The files should be in the same + // rag_corpus set in rag_corpus field. + RagFileIds []string `json:"ragFileIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpus") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API + // NullFields is a list of field names (e.g. "RagCorpus") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VertexRagStoreRagResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexRagStoreRagResource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1VideoMetadata: Metadata describes the input video +// content. +type GoogleCloudAiplatformV1VideoMetadata struct { + // EndOffset: Optional. The end offset of the video. + EndOffset string `json:"endOffset,omitempty"` + // StartOffset: Optional. The start offset of the video. + StartOffset string `json:"startOffset,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndOffset") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VideoMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VideoMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1VoiceConfig: The configuration for the voice to use. +type GoogleCloudAiplatformV1VoiceConfig struct { + // PrebuiltVoiceConfig: The configuration for the prebuilt voice to use. + PrebuiltVoiceConfig *GoogleCloudAiplatformV1PrebuiltVoiceConfig `json:"prebuiltVoiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrebuiltVoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PrebuiltVoiceConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WorkerPoolSpec: Represents the spec of a worker pool +// in a job. +type GoogleCloudAiplatformV1WorkerPoolSpec struct { + // ContainerSpec: The custom container task. + ContainerSpec *GoogleCloudAiplatformV1ContainerSpec `json:"containerSpec,omitempty"` + // DiskSpec: Disk spec. + DiskSpec *GoogleCloudAiplatformV1DiskSpec `json:"diskSpec,omitempty"` + // MachineSpec: Optional. Immutable. The specification of a single machine. + MachineSpec *GoogleCloudAiplatformV1MachineSpec `json:"machineSpec,omitempty"` + // NfsMounts: Optional. List of NFS mount spec. + NfsMounts []*GoogleCloudAiplatformV1NfsMount `json:"nfsMounts,omitempty"` + // PythonPackageSpec: The Python packaged task. + PythonPackageSpec *GoogleCloudAiplatformV1PythonPackageSpec `json:"pythonPackageSpec,omitempty"` + // ReplicaCount: Optional. The number of worker replicas to use for this worker + // pool. + ReplicaCount int64 `json:"replicaCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ContainerSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContainerSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1WorkerPoolSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WorkerPoolSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteFeatureValuesPayload: Contains Feature values to +// be written for a specific entity. +type GoogleCloudAiplatformV1WriteFeatureValuesPayload struct { + // EntityId: Required. The ID of the entity. + EntityId string `json:"entityId,omitempty"` + // FeatureValues: Required. Feature values to be written, mapping from Feature + // ID to value. Up to 100,000 `feature_values` entries may be written across + // all payloads. The feature generation time, aligned by days, must be no older + // than five years (1825 days) and no later than one year (366 days) in the + // future. + FeatureValues map[string]GoogleCloudAiplatformV1FeatureValue `json:"featureValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "EntityId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EntityId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +func (s GoogleCloudAiplatformV1WriteFeatureValuesPayload) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WriteFeatureValuesPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteFeatureValuesRequest: Request message for +// FeaturestoreOnlineServingService.WriteFeatureValues. +type GoogleCloudAiplatformV1WriteFeatureValuesRequest struct { + // Payloads: Required. The entities to be written. Up to 100,000 feature values + // can be written across all `payloads`. + Payloads []*GoogleCloudAiplatformV1WriteFeatureValuesPayload `json:"payloads,omitempty"` + // ForceSendFields is a list of field names (e.g. "Payloads") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Payloads") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1WriteFeatureValuesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WriteFeatureValuesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteFeatureValuesResponse: Response message for +// FeaturestoreOnlineServingService.WriteFeatureValues. +type GoogleCloudAiplatformV1WriteFeatureValuesResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest: Request +// message for TensorboardService.WriteTensorboardExperimentData. +type GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest struct { + // WriteRunDataRequests: Required. Requests containing per-run + // TensorboardTimeSeries data to write. + WriteRunDataRequests []*GoogleCloudAiplatformV1WriteTensorboardRunDataRequest `json:"writeRunDataRequests,omitempty"` + // ForceSendFields is a list of field names (e.g. "WriteRunDataRequests") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "WriteRunDataRequests") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteTensorboardExperimentDataResponse: Response +// message for TensorboardService.WriteTensorboardExperimentData. +type GoogleCloudAiplatformV1WriteTensorboardExperimentDataResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudAiplatformV1WriteTensorboardRunDataRequest: Request message for +// TensorboardService.WriteTensorboardRunData. +type GoogleCloudAiplatformV1WriteTensorboardRunDataRequest struct { + // TensorboardRun: Required. The resource name of the TensorboardRun to write + // data to. Format: + // `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experimen + // ts/{experiment}/runs/{run}` + TensorboardRun string `json:"tensorboardRun,omitempty"` + // TimeSeriesData: Required. The TensorboardTimeSeries data to write. Values + // with in a time series are indexed by their step value. Repeated writes to + // the same step will overwrite the existing value for that step. The upper + // limit of data points per write request is 5000. + TimeSeriesData []*GoogleCloudAiplatformV1TimeSeriesData `json:"timeSeriesData,omitempty"` + // ForceSendFields is a list of field names (e.g. "TensorboardRun") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TensorboardRun") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1WriteTensorboardRunDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WriteTensorboardRunDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteTensorboardRunDataResponse: Response message for +// TensorboardService.WriteTensorboardRunData. +type GoogleCloudAiplatformV1WriteTensorboardRunDataResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudAiplatformV1XraiAttribution: An explanation method that +// redistributes Integrated Gradients attributions to segmented regions, taking +// advantage of the model's fully differentiable structure. Refer to this paper +// for more details: https://arxiv.org/abs/1906.02825 Supported only by image +// Models. +type GoogleCloudAiplatformV1XraiAttribution struct { + // BlurBaselineConfig: Config for XRAI with blur baseline. When enabled, a + // linear path from the maximally blurred image to the input image is created. + // Using a blurred baseline instead of zero (black image) is motivated by the + // BlurIG approach explained here: https://arxiv.org/abs/2004.03383 + BlurBaselineConfig *GoogleCloudAiplatformV1BlurBaselineConfig `json:"blurBaselineConfig,omitempty"` + // SmoothGradConfig: Config for SmoothGrad approximation of gradients. When + // enabled, the gradients are approximated by averaging the gradients from + // noisy samples in the vicinity of the inputs. Adding noise can help improve + // the computed gradients. Refer to this paper for more details: + // https://arxiv.org/pdf/1706.03825.pdf + SmoothGradConfig *GoogleCloudAiplatformV1SmoothGradConfig `json:"smoothGradConfig,omitempty"` + // StepCount: Required. The number of steps for approximating the path + // integral. A good value to start is 50 and gradually increase until the sum + // to diff property is met within the desired error range. Valid range of its + // value is [1, 100], inclusively. + StepCount int64 `json:"stepCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlurBaselineConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlurBaselineConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1XraiAttribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1XraiAttribution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationListLocationsResponse: The response message for +// Locations.ListLocations. +type GoogleCloudLocationListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. + 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. "Locations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Locations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationLocation: A resource that represents a Google Cloud +// location. +type GoogleCloudLocationLocation struct { + // DisplayName: The friendly name for this location, typically a nearby city + // name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + // LocationId: The canonical id for this location. For example: "us-east1". + LocationId string `json:"locationId,omitempty"` + // Metadata: Service-specific metadata. For example the available capacity at + // the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a `role`. +type GoogleIamV1Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the current + // request. If the condition evaluates to `false`, then this binding does not + // apply to the current request. However, a different role binding might grant + // the same role to one or more of the principals in this binding. To learn + // which resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *GoogleTypeExpr `json:"condition,omitempty"` + // Members: Specifies the principals requesting access for a Google Cloud + // resource. `members` can have the following values: * `allUsers`: A special + // identifier that represents anyone who is on the internet; with or without a + // Google account. * `allAuthenticatedUsers`: A special identifier that + // represents anyone who is authenticated with a Google account or a service + // account. Does not include identities that come from external identity + // providers (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that + // represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An + // identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * + // `group:{emailid}`: An email address that represents a Google group. For + // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain + // (primary) that represents all the users of that domain. For example, + // `google.com` or `example.com`. * + // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub + // ject/{subject_attribute_value}`: A single identity in a workforce identity + // pool. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // group/{group_id}`: All workforce identities in a group. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // attribute.{attribute_name}/{attribute_value}`: All workforce identities with + // a specific attribute value. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // *`: All identities in a workforce identity pool. * + // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo + // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single + // identity in a workload identity pool. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool + // group. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} + // `: All identities in a workload identity pool with a certain attribute. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity + // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently deleted. For + // example, `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered user + // retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a service account that has been recently + // deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the + // service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains the + // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email + // address (plus unique identifier) representing a Google group that has been + // recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is recovered, + // this value reverts to `group:{emailid}` and the recovered group retains the + // role in the binding. * + // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool + // _id}/subject/{subject_attribute_value}`: Deleted single identity in a + // workforce identity pool. For example, + // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po + // ol-id/subject/my-subject-attribute-value`. + Members []string `json:"members,omitempty"` + // Role: Role that is assigned to the list of `members`, or principals. For + // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview + // of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). + Role string `json:"role,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, service +// accounts, Google groups, and domains (such as G Suite). A `role` is a named +// list of permissions; each `role` can be an IAM predefined role or a +// user-created custom role. For some types of Google Cloud resources, a +// `binding` can also specify a `condition`, which is a logical expression that +// allows access to a resource only if the expression evaluates to `true`. A +// condition can add constraints based on attributes of the request, the +// resource, or both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON +// example:** ``` { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": +// "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": +// "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com +// role: roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access after +// Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') +// etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, +// see the IAM documentation (https://cloud.google.com/iam/docs/). +type GoogleIamV1Policy struct { + // Bindings: Associates a list of `members`, or principals, with a `role`. + // Optionally, may specify a `condition` that determines how and when the + // `bindings` are applied. Each of the `bindings` must contain at least one + // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; + // up to 250 of these principals can be Google groups. Each occurrence of a + // principal counts towards these limits. For example, if the `bindings` grant + // 50 different roles to `user:alice@example.com`, and not to any other + // principal, then you can add another 1,450 principals to the `bindings` in + // the `Policy`. + Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` + // Etag: `etag` is used for optimistic concurrency control as a way to help + // prevent simultaneous updates of a policy from overwriting each other. It is + // strongly suggested that systems make use of the `etag` in the + // read-modify-write cycle to perform policy updates in order to avoid race + // conditions: An `etag` is returned in the response to `getIamPolicy`, and + // systems are expected to put that etag in the request to `setIamPolicy` to + // ensure that their change will be applied to the same version of the policy. + // **Important:** If you use IAM Conditions, you must include the `etag` field + // whenever you call `setIamPolicy`. If you omit this field, then IAM allows + // you to overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + // Version: Specifies the format of the policy. Valid values are `0`, `1`, and + // `3`. Requests that specify an invalid value are rejected. Any operation that + // affects conditional role bindings must specify version `3`. This requirement + // applies to the following operations: * Getting a policy that includes a + // conditional role binding * Adding a conditional role binding to a policy * + // Changing a conditional role binding in a policy * Removing any role binding, + // with or without a condition, from a policy that includes conditions + // **Important:** If you use IAM Conditions, you must include the `etag` field + // whenever you call `setIamPolicy`. If you omit this field, then IAM allows + // you to overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. If a policy does not + // include any conditions, operations on that policy may specify any valid + // version or leave the field unset. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Bindings") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bindings") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type GoogleIamV1SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the `resource`. The + // size of the policy is limited to a few 10s of KB. An empty policy is a valid + // policy but certain Google Cloud services (such as Projects) might reject + // them. + Policy *GoogleIamV1Policy `json:"policy,omitempty"` + // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1SetIamPolicyRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1TestIamPermissionsResponse: Response message for +// `TestIamPermissions` method. +type GoogleIamV1TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that the + // caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Permissions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1TestIamPermissionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + // Operations: A list of operations that matches the specified filter in the + // request. + Operations []*GoogleLongrunningOperation `json:"operations,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to avoid +// defining duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For instance: +// service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs and RPC +// APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message +// contains three pieces of data: error code, error message, and error details. +// You can find out more about this error model and how to work with it in the +// API Design Guide (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeColor: Represents a color in the RGBA color space. This +// representation is designed for simplicity of conversion to and from color +// representations in various languages over compactness. For example, the +// fields of this representation can be trivially provided to the constructor +// of `java.awt.Color` in Java; it can also be trivially provided to UIColor's +// `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little +// work, it can be easily formatted into a CSS `rgba()` string in JavaScript. +// This reference page doesn't have information about the absolute color space +// that should be used to interpret the RGB value—for example, sRGB, Adobe +// RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB +// color space. When color equality needs to be decided, implementations, +// unless documented otherwise, treat two colors as equal if all their red, +// green, blue, and alpha values each differ by at most `1e-5`. Example (Java): +// import com.google.type.Color; // ... public static java.awt.Color +// fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? +// protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( +// protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } +// public static Color toProto(java.awt.Color color) { float red = (float) +// color.getRed(); float green = (float) color.getGreen(); float blue = (float) +// color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = +// Color .newBuilder() .setRed(red / denominator) .setGreen(green / +// denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if +// (alpha != 255) { result.setAlpha( FloatValue .newBuilder() +// .setValue(((float) alpha) / denominator) .build()); } return +// resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static +// UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float +// green = [protocolor green]; float blue = [protocolor blue]; FloatValue* +// alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != +// nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red +// green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) +// { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green +// blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] +// init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; +// if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } +// [result autorelease]; return result; } // ... Example (JavaScript): // ... +// var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || +// 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue +// || 0.0; var red = Math.floor(redFrac * 255); var green = +// Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if +// (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var +// alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, +// blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); +// }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new +// Number((red << 16) | (green << 8) | blue); var hexString = +// rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var +// resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { +// resultBuilder.push('0'); } resultBuilder.push(hexString); return +// resultBuilder.join(”); }; // ... +type GoogleTypeColor struct { + // Alpha: The fraction of this color that should be applied to the pixel. That + // is, the final pixel color is defined by the equation: `pixel color = alpha * + // (this color) + (1.0 - alpha) * (background color)` This means that a value + // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a + // completely transparent color. This uses a wrapper message rather than a + // simple float scalar so that it is possible to distinguish between a default + // value and the value being unset. If omitted, this color object is rendered + // as a solid color (as if the alpha value had been explicitly given a value of + // 1.0). + Alpha float64 `json:"alpha,omitempty"` + // Blue: The amount of blue in the color as a value in the interval [0, 1]. + Blue float64 `json:"blue,omitempty"` + // Green: The amount of green in the color as a value in the interval [0, 1]. + Green float64 `json:"green,omitempty"` + // Red: The amount of red in the color as a value in the interval [0, 1]. + Red float64 `json:"red,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Alpha") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeColor) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeColor + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error { + type NoMethod GoogleTypeColor + var s1 struct { + Alpha gensupport.JSONFloat64 `json:"alpha"` + Blue gensupport.JSONFloat64 `json:"blue"` + Green gensupport.JSONFloat64 `json:"green"` + Red gensupport.JSONFloat64 `json:"red"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Alpha = float64(s1.Alpha) + s.Blue = float64(s1.Blue) + s.Green = float64(s1.Green) + s.Red = float64(s1.Red) + return nil +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as a +// birthday. The time of day and time zone are either specified elsewhere or +// are insignificant. The date is relative to the Gregorian Calendar. This can +// represent one of the following: * A full date, with non-zero year, month, +// and day values. * A month and day, with a zero year (for example, an +// anniversary). * A year on its own, with a zero month and a zero day. * A +// year and month, with a zero day (for example, a credit card expiration +// date). Related types: * google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, + // or 0 to specify a year by itself or a year and month where the day isn't + // significant. + Day int64 `json:"day,omitempty"` + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without + // a month and day. + Month int64 `json:"month,omitempty"` + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date + // without a year. + Year int64 `json:"year,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Day") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The syntax and +// semantics of CEL are documented at https://github.com/google/cel-spec. +// Example (Comparison): title: "Summary size limit" description: "Determines +// if a summary is less than 100 chars" expression: "document.summary.size() < +// 100" Example (Equality): title: "Requestor is owner" description: +// "Determines if requestor is the document owner" expression: "document.owner +// == request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly visible" +// expression: "document.type != 'private' && document.type != 'internal'" +// Example (Data Manipulation): title: "Notification string" description: +// "Create a notification string with a timestamp." expression: "'New message +// received at ' + string(document.create_time)" The exact variables and +// functions that may be referenced within an expression are determined by the +// service that evaluates it. See the service documentation for additional +// information. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a longer text + // which describes the expression, e.g. when hovered over it in a UI. + Description string `json:"description,omitempty"` + // Expression: Textual representation of an expression in Common Expression + // Language syntax. + Expression string `json:"expression,omitempty"` + // Location: Optional. String indicating the location of the expression for + // error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + // Title: Optional. Title for the expression, i.e. a short string describing + // its purpose. This can be used e.g. in UIs which allow to enter the + // expression. + Title string `json:"title,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeInterval: Represents a time interval, encoded as a Timestamp start +// (inclusive) and a Timestamp end (exclusive). The start must be less than or +// equal to the end. When the start equals the end, the interval is empty +// (matches no time). When both start and end are unspecified, the interval +// matches any time. +type GoogleTypeInterval struct { + // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp + // matching this interval will have to be before the end. + EndTime string `json:"endTime,omitempty"` + // StartTime: Optional. Inclusive start of the interval. If specified, a + // Timestamp matching this interval will have to be the same or after the + // start. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeMoney: Represents an amount of money with its currency type. +type GoogleTypeMoney struct { + // CurrencyCode: The three-letter currency code defined in ISO 4217. + CurrencyCode string `json:"currencyCode,omitempty"` + // Nanos: Number of nano (10^-9) units of the amount. The value must be between + // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` + // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, + // or negative. If `units` is negative, `nanos` must be negative or zero. For + // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + Nanos int64 `json:"nanos,omitempty"` + // Units: The whole units of the amount. For example if `currencyCode` is + // "USD", then 1 unit is one US dollar. + Units int64 `json:"units,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CurrencyCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CurrencyCode") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeMoney + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type DatasetsCreateCall struct { + s *Service + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Dataset. +func (r *DatasetsService) Create(googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsCreateCall { + c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// Parent sets the optional parameter "parent": Required. The resource name of +// the Location to create the Dataset in. Format: +// `projects/{project}/locations/{location}` +func (c *DatasetsCreateCall) Parent(parent string) *DatasetsCreateCall { + c.urlParams_.Set("parent", parent) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.create" call. +// 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 *DatasetsCreateCall) 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 +} + +type DatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Dataset. +// +// - name: The resource name of the Dataset to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { + c := &DatasetsDeleteCall{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 +// details. +func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.datasets.delete" call. +// 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 *DatasetsDeleteCall) 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 +} + +type DatasetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset. +// +// - name: The name of the Dataset resource. +func (r *DatasetsService) Get(name string) *DatasetsGetCall { + c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsGetCall) ReadMask(readMask string) *DatasetsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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.datasets.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1Dataset.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 *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, 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 := &GoogleCloudAiplatformV1Dataset{ + 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 +} + +type DatasetsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Datasets in a Location. +func (r *DatasetsService) List() *DatasetsListCall { + c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `display_name`: supports = and != * `metadata_schema_uri`: +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" +func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` +func (c *DatasetsListCall) OrderBy(orderBy string) *DatasetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Parent sets the optional parameter "parent": Required. The name of the +// Dataset's parent resource. Format: `projects/{project}/locations/{location}` +func (c *DatasetsListCall) Parent(parent string) *DatasetsListCall { + c.urlParams_.Set("parent", parent) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/datasets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ListDatasetsResponse.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 *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, 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 := &GoogleCloudAiplatformV1ListDatasetsResponse{ + 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 +} + +// 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 *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type DatasetsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Dataset. +// +// - name: Output only. Identifier. The resource name of the Dataset. +func (r *DatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsPatchCall { + c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` * +// `description` * `labels` +func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1Dataset.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 *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, 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 := &GoogleCloudAiplatformV1Dataset{ + 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 +} + +type DatasetsDatasetVersionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a version from a Dataset. +// +// - parent: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsCreateCall { + c := &DatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *DatasetsDatasetVersionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + 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.datasets.datasetVersions.create" call. +// 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 *DatasetsDatasetVersionsCreateCall) 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 +} + +type DatasetsDatasetVersionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVersionsDeleteCall { + c := &DatasetsDatasetVersionsDeleteCall{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 +// details. +func (c *DatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *DatasetsDatasetVersionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.datasets.datasetVersions.delete" call. +// 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 *DatasetsDatasetVersionsDeleteCall) 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 +} + +type DatasetsDatasetVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Get(name string) *DatasetsDatasetVersionsGetCall { + c := &DatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsGetCall) ReadMask(readMask string) *DatasetsDatasetVersionsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *DatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsGetCall) Context(ctx context.Context) *DatasetsDatasetVersionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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.datasets.datasetVersions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1DatasetVersion.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 *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, 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 := &GoogleCloudAiplatformV1DatasetVersion{ + 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 +} + +type DatasetsDatasetVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DatasetVersions in a Dataset. +// +// - parent: The resource name of the Dataset to list DatasetVersions from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) List(parent string) *DatasetsDatasetVersionsListCall { + c := &DatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *DatasetsDatasetVersionsListCall) Filter(filter string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *DatasetsDatasetVersionsListCall) OrderBy(orderBy string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsDatasetVersionsListCall) PageSize(pageSize int64) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsDatasetVersionsListCall) PageToken(pageToken string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsListCall) ReadMask(readMask string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *DatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsListCall) Context(ctx context.Context) *DatasetsDatasetVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+parent}/datasetVersions") + 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.datasets.datasetVersions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.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 *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, 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 := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ + 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 +} + +// 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 *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type DatasetsDatasetVersionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DatasetVersion. +// +// - name: Output only. Identifier. The resource name of the DatasetVersion. +func (r *DatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsPatchCall { + c := &DatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` +func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *DatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *DatasetsDatasetVersionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1DatasetVersion.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 *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, 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 := &GoogleCloudAiplatformV1DatasetVersion{ + 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 +} + +type DatasetsDatasetVersionsRestoreCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a dataset version. +// +// - name: The name of the DatasetVersion resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Restore(name string) *DatasetsDatasetVersionsRestoreCall { + c := &DatasetsDatasetVersionsRestoreCall{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 +// details. +func (c *DatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *DatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsRestoreCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *DatasetsDatasetVersionsRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:restore") + 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.datasets.datasetVersions.restore" call. +// 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 *DatasetsDatasetVersionsRestoreCall) 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 +} + +type EndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *EndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *EndpointsComputeTokensCall { + c := &EndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsComputeTokensCall) Fields(s ...googleapi.Field) *EndpointsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsComputeTokensCall) Context(ctx context.Context) *EndpointsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ComputeTokensResponse.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 *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1ComputeTokensResponse{ + 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 +} + +type EndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *EndpointsCountTokensCall { + c := &EndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsCountTokensCall) Fields(s ...googleapi.Field) *EndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsCountTokensCall) Context(ctx context.Context) *EndpointsCountTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.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 *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, 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 := &GoogleCloudAiplatformV1CountTokensResponse{ + 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 +} + +type EndpointsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsGenerateContentCall { + c := &EndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsGenerateContentCall) Context(ctx context.Context) *EndpointsGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + 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 +} + +type EndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsStreamGenerateContentCall { + c := &EndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsStreamGenerateContentCall) Context(ctx context.Context) *EndpointsStreamGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + 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 +} + +type MediaUploadCall struct { + s *Service + parent string + googlecloudaiplatformv1uploadragfilerequest *GoogleCloudAiplatformV1UploadRagFileRequest + 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, googlecloudaiplatformv1uploadragfilerequest *GoogleCloudAiplatformV1UploadRagFileRequest) *MediaUploadCall { + c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1uploadragfilerequest = googlecloudaiplatformv1uploadragfilerequest + 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 +// details. +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. +// 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 a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1uploadragfilerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles:upload") + if c.mediaInfo_ != nil { + urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+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. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1UploadRagFileResponse.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 *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1UploadRagFileResponse, 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 := &GoogleCloudAiplatformV1UploadRagFileResponse{ + 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 +} + +type ProjectsGetCacheConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCacheConfig: Gets a GenAI cache config. +// +// - name: Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { + c := &ProjectsGetCacheConfigCall{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 +// details. +func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsGetCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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.getCacheConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CacheConfig.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 *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CacheConfig, 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 := &GoogleCloudAiplatformV1CacheConfig{ + 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 +} + +type ProjectsUpdateCacheConfigCall struct { + s *Service + name string + googlecloudaiplatformv1cacheconfig *GoogleCloudAiplatformV1CacheConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCacheConfig: Updates a cache config. +// +// - name: Identifier. Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1cacheconfig *GoogleCloudAiplatformV1CacheConfig) *ProjectsUpdateCacheConfigCall { + c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1cacheconfig = googlecloudaiplatformv1cacheconfig + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsUpdateCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cacheconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.updateCacheConfig" call. +// 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 *ProjectsUpdateCacheConfigCall) 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 +} + +type ProjectsLocationsAugmentPromptCall struct { + s *Service + parent string + googlecloudaiplatformv1augmentpromptrequest *GoogleCloudAiplatformV1AugmentPromptRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AugmentPrompt: Given an input prompt, it returns augmented prompt from +// vertex rag store to guide LLM towards generating grounded responses. +// +// - parent: The resource name of the Location from which to augment prompt. +// The users must have permission to make a call in the project. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) AugmentPrompt(parent string, googlecloudaiplatformv1augmentpromptrequest *GoogleCloudAiplatformV1AugmentPromptRequest) *ProjectsLocationsAugmentPromptCall { + c := &ProjectsLocationsAugmentPromptCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1augmentpromptrequest = googlecloudaiplatformv1augmentpromptrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAugmentPromptCall) Fields(s ...googleapi.Field) *ProjectsLocationsAugmentPromptCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAugmentPromptCall) Context(ctx context.Context) *ProjectsLocationsAugmentPromptCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAugmentPromptCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAugmentPromptCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1augmentpromptrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:augmentPrompt") + 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.augmentPrompt" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1AugmentPromptResponse.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 *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AugmentPromptResponse, 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 := &GoogleCloudAiplatformV1AugmentPromptResponse{ + 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 +} + +type ProjectsLocationsCorroborateContentCall struct { + s *Service + parent string + googlecloudaiplatformv1corroboratecontentrequest *GoogleCloudAiplatformV1CorroborateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CorroborateContent: Given an input text, it returns a score that evaluates +// the factuality of the text. It also extracts and returns claims from the +// text and provides supporting facts. +// +// - parent: The resource name of the Location from which to corroborate text. +// The users must have permission to make a call in the project. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) CorroborateContent(parent string, googlecloudaiplatformv1corroboratecontentrequest *GoogleCloudAiplatformV1CorroborateContentRequest) *ProjectsLocationsCorroborateContentCall { + c := &ProjectsLocationsCorroborateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1corroboratecontentrequest = googlecloudaiplatformv1corroboratecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCorroborateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCorroborateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCorroborateContentCall) Context(ctx context.Context) *ProjectsLocationsCorroborateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCorroborateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCorroborateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1corroboratecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:corroborateContent") + 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.corroborateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CorroborateContentResponse.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 *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CorroborateContentResponse, 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 := &GoogleCloudAiplatformV1CorroborateContentResponse{ + 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 +} + +type ProjectsLocationsEvaluateInstancesCall struct { + s *Service + location string + googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EvaluateInstances: Evaluates instances based on a given metric. +// +// - location: The resource name of the Location to evaluate the instances. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { + c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1evaluateinstancesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.evaluateInstances" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1EvaluateInstancesResponse.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 *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, 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 := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + 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 +} + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, 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 := &GoogleCloudLocationLocation{ + 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 +} + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this service. +// +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the `next_page_token` field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}/locations") + 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.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, 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 := &GoogleCloudLocationListLocationsResponse{ + 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 +} + +// 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsRetrieveContextsCall struct { + s *Service + parent string + googlecloudaiplatformv1retrievecontextsrequest *GoogleCloudAiplatformV1RetrieveContextsRequest + 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, googlecloudaiplatformv1retrievecontextsrequest *GoogleCloudAiplatformV1RetrieveContextsRequest) *ProjectsLocationsRetrieveContextsCall { + c := &ProjectsLocationsRetrieveContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1retrievecontextsrequest = googlecloudaiplatformv1retrievecontextsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +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. +func (c *ProjectsLocationsRetrieveContextsCall) Context(ctx context.Context) *ProjectsLocationsRetrieveContextsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1retrievecontextsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1RetrieveContextsResponse.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 *ProjectsLocationsRetrieveContextsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RetrieveContextsResponse, 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 := &GoogleCloudAiplatformV1RetrieveContextsResponse{ + 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 +} + +type ProjectsLocationsBatchPredictionJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GoogleTypeInterval: Represents a time interval, encoded as a Timestamp start -// (inclusive) and a Timestamp end (exclusive). The start must be less than or -// equal to the end. When the start equals the end, the interval is empty -// (matches no time). When both start and end are unspecified, the interval -// matches any time. -type GoogleTypeInterval struct { - // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp - // matching this interval will have to be before the end. - EndTime string `json:"endTime,omitempty"` - // StartTime: Optional. Inclusive start of the interval. If specified, a - // Timestamp matching this interval will have to be the same or after the - // start. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` +// Cancel: Cancels a BatchPredictionJob. Starts asynchronous cancellation on +// the BatchPredictionJob. The server makes the best effort to cancel the job, +// but success is not guaranteed. Clients can use +// JobService.GetBatchPredictionJob or other methods to check whether the +// cancellation succeeded or whether the job completed despite cancellation. On +// a successful cancellation, the BatchPredictionJob is not deleted;instead its +// BatchPredictionJob.state is set to `CANCELLED`. Any files already outputted +// by the job are not deleted. +// +// - name: The name of the BatchPredictionJob to cancel. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Cancel(name string, googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest) *ProjectsLocationsBatchPredictionJobsCancelCall { + c := &ProjectsLocationsBatchPredictionJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1cancelbatchpredictionjobrequest = googlecloudaiplatformv1cancelbatchpredictionjobrequest + return c } -func (s GoogleTypeInterval) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeInterval - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c } -// GoogleTypeMoney: Represents an amount of money with its currency type. -type GoogleTypeMoney struct { - // CurrencyCode: The three-letter currency code defined in ISO 4217. - CurrencyCode string `json:"currencyCode,omitempty"` - // Nanos: Number of nano (10^-9) units of the amount. The value must be between - // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` - // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, - // or negative. If `units` is negative, `nanos` must be negative or zero. For - // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - Nanos int64 `json:"nanos,omitempty"` - // Units: The whole units of the amount. For example if `currencyCode` is - // "USD", then 1 unit is one US dollar. - Units int64 `json:"units,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CurrencyCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrencyCode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCancelCall { + c.ctx_ = ctx + return c } -func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeMoney - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -type DatasetsCreateCall struct { - s *Service - googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelbatchpredictionjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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) } -// Create: Creates a Dataset. -func (r *DatasetsService) Create(googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsCreateCall { - c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset - return c +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.cancel" call. +// 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 *ProjectsLocationsBatchPredictionJobsCancelCall) 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 } -// Parent sets the optional parameter "parent": Required. The resource name of -// the Location to create the Dataset in. Format: -// `projects/{project}/locations/{location}` -func (c *DatasetsCreateCall) Parent(parent string) *DatasetsCreateCall { - c.urlParams_.Set("parent", parent) +type ProjectsLocationsBatchPredictionJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a BatchPredictionJob. A BatchPredictionJob once created will +// right away be attempted to start. +// +// - parent: The resource name of the Location to create the BatchPredictionJob +// in. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Create(parent string, googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob) *ProjectsLocationsBatchPredictionJobsCreateCall { + c := &ProjectsLocationsBatchPredictionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchpredictionjob = googlecloudaiplatformv1batchpredictionjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsCreateCall) Header() http.Header { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchpredictionjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") 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.datasets.create" call. +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.create" call. // 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 +// *GoogleCloudAiplatformV1BatchPredictionJob.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 *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37617,7 +41530,7 @@ func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1BatchPredictionJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37630,7 +41543,7 @@ func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin return ret, nil } -type DatasetsDeleteCall struct { +type ProjectsLocationsBatchPredictionJobsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -37638,12 +41551,14 @@ type DatasetsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Dataset. +// Delete: Deletes a BatchPredictionJob. Can only be called on jobs that +// already finished. // -// - name: The resource name of the Dataset to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { - c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the BatchPredictionJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *ProjectsLocationsBatchPredictionJobsDeleteCall { + c := &ProjectsLocationsBatchPredictionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -37651,27 +41566,27 @@ func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -37689,13 +41604,13 @@ func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.delete" call. +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.delete" call. // 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 *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37727,7 +41642,7 @@ func (c *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin return ret, nil } -type DatasetsGetCall struct { +type ProjectsLocationsBatchPredictionJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -37736,26 +41651,21 @@ type DatasetsGetCall struct { header_ http.Header } -// Get: Gets a Dataset. +// Get: Gets a BatchPredictionJob // -// - name: The name of the Dataset resource. -func (r *DatasetsService) Get(name string) *DatasetsGetCall { - c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the BatchPredictionJob resource. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Get(name string) *ProjectsLocationsBatchPredictionJobsGetCall { + c := &ProjectsLocationsBatchPredictionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *DatasetsGetCall) ReadMask(readMask string) *DatasetsGetCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37763,27 +41673,27 @@ func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { // IfNoneMatch sets an 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. -func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchPredictionJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsGetCall) Header() http.Header { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -37804,13 +41714,13 @@ func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.get" call. +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1BatchPredictionJob.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 *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37829,7 +41739,7 @@ func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Dataset{ + ret := &GoogleCloudAiplatformV1BatchPredictionJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37842,65 +41752,60 @@ func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo return ret, nil } -type DatasetsListCall struct { +type ProjectsLocationsBatchPredictionJobsListCall struct { s *Service + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Datasets in a Location. -func (r *DatasetsService) List() *DatasetsListCall { - c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// List: Lists BatchPredictionJobs in a Location. +// +// - parent: The resource name of the Location to list the BatchPredictionJobs +// from. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsBatchPredictionJobsService) List(parent string) *ProjectsLocationsBatchPredictionJobsListCall { + c := &ProjectsLocationsBatchPredictionJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `display_name`: supports = and != * `metadata_schema_uri`: -// supports = and != * `labels` supports general map functions that is: * -// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key -// existence * A key including a space must be quoted. `labels."a key". Some -// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" -func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `model_display_name` supports `=`, `!=` comparisons. * `state` +// supports `=`, `!=` comparisons. * `create_time` supports `=`, `!=`,`<`, +// `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 format. * +// `labels` supports general map functions that is: `labels.key=value` - +// key:value equality `labels.key:* - key existence Some examples of using the +// filter are: * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*" * +// `state!="JOB_STATE_FAILED" OR display_name="my_job" * `NOT +// display_name="my_job" * `create_time>"2021-05-18T00:00:00Z" * +// `labels.keyA=valueA` * `labels.keyB:*` +func (c *ProjectsLocationsBatchPredictionJobsListCall) Filter(filter string) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `display_name` * `create_time` * -// `update_time` -func (c *DatasetsListCall) OrderBy(orderBy string) *DatasetsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { +// token. Typically obtained via +// ListBatchPredictionJobsResponse.next_page_token of the previous +// JobService.ListBatchPredictionJobs call. +func (c *ProjectsLocationsBatchPredictionJobsListCall) PageToken(pageToken string) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Parent sets the optional parameter "parent": Required. The name of the -// Dataset's parent resource. Format: `projects/{project}/locations/{location}` -func (c *DatasetsListCall) Parent(parent string) *DatasetsListCall { - c.urlParams_.Set("parent", parent) - return c -} - // ReadMask sets the optional parameter "readMask": Mask specifying which // fields to read. -func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) ReadMask(readMask string) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -37908,7 +41813,7 @@ func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37916,27 +41821,27 @@ func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { // IfNoneMatch sets an 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. -func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchPredictionJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsListCall) Header() http.Header { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBatchPredictionJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -37944,23 +41849,28 @@ func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") 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.datasets.list" call. +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDatasetsResponse.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 +// *GoogleCloudAiplatformV1ListBatchPredictionJobsResponse.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 *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, error) { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListBatchPredictionJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37979,7 +41889,7 @@ func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatf if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDatasetsResponse{ + ret := &GoogleCloudAiplatformV1ListBatchPredictionJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37995,7 +41905,7 @@ func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatf // 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 *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListBatchPredictionJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -38013,170 +41923,59 @@ func (c *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatf } } -type DatasetsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a Dataset. -// -// - name: Output only. Identifier. The resource name of the Dataset. -func (r *DatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsPatchCall { - c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Updatable fields: * `display_name` * -// `description` * `labels` -func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DatasetsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.datasets.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Dataset.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 *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, 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 := &GoogleCloudAiplatformV1Dataset{ - 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 -} - -type DatasetsDatasetVersionsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCachedContentsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a version from a Dataset. +// Create: Creates cached content, this call will initialize the cached content +// in the data storage, and users need to pay for the cache data storage. // -// - parent: The name of the Dataset resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *DatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsCreateCall { - c := &DatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource where the cached content will be created. +func (r *ProjectsLocationsCachedContentsService) Create(parent string, googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent) *ProjectsLocationsCachedContentsCreateCall { + c := &ProjectsLocationsCachedContentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + c.googlecloudaiplatformv1cachedcontent = googlecloudaiplatformv1cachedcontent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsCreateCall { +func (c *ProjectsLocationsCachedContentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *DatasetsDatasetVersionsCreateCall { +func (c *ProjectsLocationsCachedContentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cachedcontent) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cachedContents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -38189,13 +41988,13 @@ func (c *DatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.create" call. +// Do executes the "aiplatform.projects.locations.cachedContents.create" call. // 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 +// *GoogleCloudAiplatformV1CachedContent.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 *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCachedContentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38214,7 +42013,7 @@ func (c *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1CachedContent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38227,7 +42026,7 @@ func (c *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type DatasetsDatasetVersionsDeleteCall struct { +type ProjectsLocationsCachedContentsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -38235,13 +42034,11 @@ type DatasetsDatasetVersionsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Dataset version. +// Delete: Deletes cached content // -// - name: The resource name of the Dataset version to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVersionsDeleteCall { - c := &DatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name referring to the cached content. +func (r *ProjectsLocationsCachedContentsService) Delete(name string) *ProjectsLocationsCachedContentsDeleteCall { + c := &ProjectsLocationsCachedContentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -38249,27 +42046,27 @@ func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVer // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsDeleteCall { +func (c *ProjectsLocationsCachedContentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *DatasetsDatasetVersionsDeleteCall { +func (c *ProjectsLocationsCachedContentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -38287,13 +42084,13 @@ func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.delete" call. +// Do executes the "aiplatform.projects.locations.cachedContents.delete" call. // 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 *DatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38312,7 +42109,7 @@ func (c *DatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*G 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, @@ -38325,7 +42122,7 @@ func (c *DatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type DatasetsDatasetVersionsGetCall struct { +type ProjectsLocationsCachedContentsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -38334,28 +42131,19 @@ type DatasetsDatasetVersionsGetCall struct { header_ http.Header } -// Get: Gets a Dataset version. +// Get: Gets cached content configurations // -// - name: The resource name of the Dataset version to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *DatasetsDatasetVersionsService) Get(name string) *DatasetsDatasetVersionsGetCall { - c := &DatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name referring to the cached content. +func (r *ProjectsLocationsCachedContentsService) Get(name string) *ProjectsLocationsCachedContentsGetCall { + c := &ProjectsLocationsCachedContentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *DatasetsDatasetVersionsGetCall) ReadMask(readMask string) *DatasetsDatasetVersionsGetCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsCachedContentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38363,27 +42151,27 @@ func (c *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsD // IfNoneMatch sets an 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. -func (c *DatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsCachedContentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCachedContentsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsGetCall) Context(ctx context.Context) *DatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsCachedContentsGetCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsGetCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38404,13 +42192,13 @@ func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.get" call. +// Do executes the "aiplatform.projects.locations.cachedContents.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1CachedContent.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 *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { +func (c *ProjectsLocationsCachedContentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38429,7 +42217,7 @@ func (c *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DatasetVersion{ + ret := &GoogleCloudAiplatformV1CachedContent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38442,7 +42230,7 @@ func (c *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*Goog return ret, nil } -type DatasetsDatasetVersionsListCall struct { +type ProjectsLocationsCachedContentsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -38451,55 +42239,37 @@ type DatasetsDatasetVersionsListCall struct { header_ http.Header } -// List: Lists DatasetVersions in a Dataset. +// List: Lists cached contents in a project // -// - parent: The resource name of the Dataset to list DatasetVersions from. -// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *DatasetsDatasetVersionsService) List(parent string) *DatasetsDatasetVersionsListCall { - c := &DatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent, which owns this collection of cached contents. +func (r *ProjectsLocationsCachedContentsService) List(parent string) *ProjectsLocationsCachedContentsListCall { + c := &ProjectsLocationsCachedContentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *DatasetsDatasetVersionsListCall) Filter(filter string) *DatasetsDatasetVersionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. -func (c *DatasetsDatasetVersionsListCall) OrderBy(orderBy string) *DatasetsDatasetVersionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *DatasetsDatasetVersionsListCall) PageSize(pageSize int64) *DatasetsDatasetVersionsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// cached contents to return. The service may return fewer than this value. If +// unspecified, some default (under maximum) number of items will be returned. +// The maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsCachedContentsListCall) PageSize(pageSize int64) *ProjectsLocationsCachedContentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *DatasetsDatasetVersionsListCall) PageToken(pageToken string) *DatasetsDatasetVersionsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListCachedContents` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListCachedContents` must match the call that provided the page token. +func (c *ProjectsLocationsCachedContentsListCall) PageToken(pageToken string) *ProjectsLocationsCachedContentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *DatasetsDatasetVersionsListCall) ReadMask(readMask string) *DatasetsDatasetVersionsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsCachedContentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38507,27 +42277,27 @@ func (c *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *Datasets // IfNoneMatch sets an 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. -func (c *DatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsCachedContentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCachedContentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsListCall) Context(ctx context.Context) *DatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsCachedContentsListCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsListCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38535,7 +42305,7 @@ func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cachedContents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38548,13 +42318,13 @@ func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.list" call. +// Do executes the "aiplatform.projects.locations.cachedContents.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.ServerResponse.Header or +// *GoogleCloudAiplatformV1ListCachedContentsResponse.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 *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, error) { +func (c *ProjectsLocationsCachedContentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListCachedContentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38573,7 +42343,7 @@ func (c *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ + ret := &GoogleCloudAiplatformV1ListCachedContentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38589,7 +42359,7 @@ func (c *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*Goo // 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 *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { +func (c *ProjectsLocationsCachedContentsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListCachedContentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -38607,29 +42377,30 @@ func (c *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*Goo } } -type DatasetsDatasetVersionsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCachedContentsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DatasetVersion. +// Patch: Updates cached content configurations // -// - name: Output only. Identifier. The resource name of the DatasetVersion. -func (r *DatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsPatchCall { - c := &DatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Identifier. The server-generated resource name of the +// cached content Format: +// projects/{project}/locations/{location}/cachedContents/{cached_content}. +func (r *ProjectsLocationsCachedContentsService) Patch(name string, googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent) *ProjectsLocationsCachedContentsPatchCall { + c := &ProjectsLocationsCachedContentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + c.googlecloudaiplatformv1cachedcontent = googlecloudaiplatformv1cachedcontent return c } -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Updatable fields: * `display_name` -func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *DatasetsDatasetVersionsPatchCall { +// UpdateMask sets the optional parameter "updateMask": Required. The list of +// fields to update. +func (c *ProjectsLocationsCachedContentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCachedContentsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -38637,30 +42408,30 @@ func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *Datase // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsPatchCall { +func (c *ProjectsLocationsCachedContentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *DatasetsDatasetVersionsPatchCall { +func (c *ProjectsLocationsCachedContentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cachedcontent) if err != nil { return nil, err } @@ -38679,13 +42450,13 @@ func (c *DatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.patch" call. +// Do executes the "aiplatform.projects.locations.cachedContents.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1CachedContent.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 *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { +func (c *ProjectsLocationsCachedContentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38704,7 +42475,7 @@ func (c *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DatasetVersion{ + ret := &GoogleCloudAiplatformV1CachedContent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38717,68 +42488,68 @@ func (c *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type DatasetsDatasetVersionsRestoreCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelcustomjobrequest *GoogleCloudAiplatformV1CancelCustomJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Restore: Restores a dataset version. +// Cancel: Cancels a CustomJob. Starts asynchronous cancellation on the +// CustomJob. The server makes a best effort to cancel the job, but success is +// not guaranteed. Clients can use JobService.GetCustomJob or other methods to +// check whether the cancellation succeeded or whether the job completed +// despite cancellation. On successful cancellation, the CustomJob is not +// deleted; instead it becomes a job with a CustomJob.error value with a +// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and +// CustomJob.state is set to `CANCELLED`. // -// - name: The name of the DatasetVersion resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *DatasetsDatasetVersionsService) Restore(name string) *DatasetsDatasetVersionsRestoreCall { - c := &DatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the CustomJob to cancel. Format: +// `projects/{project}/locations/{location}/customJobs/{custom_job}`. +func (r *ProjectsLocationsCustomJobsService) Cancel(name string, googlecloudaiplatformv1cancelcustomjobrequest *GoogleCloudAiplatformV1CancelCustomJobRequest) *ProjectsLocationsCustomJobsCancelCall { + c := &ProjectsLocationsCustomJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1cancelcustomjobrequest = googlecloudaiplatformv1cancelcustomjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsCustomJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *DatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsRestoreCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *DatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsCustomJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsRestoreCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCustomJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelcustomjobrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -38789,13 +42560,13 @@ func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.restore" call. +// Do executes the "aiplatform.projects.locations.customJobs.cancel" call. // 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 *DatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCustomJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38814,7 +42585,7 @@ func (c *DatasetsDatasetVersionsRestoreCall) 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, @@ -38827,59 +42598,60 @@ func (c *DatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type EndpointsComputeTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1customjob *GoogleCloudAiplatformV1CustomJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ComputeTokens: Return a list of tokens based on the input text. +// Create: Creates a CustomJob. A created CustomJob right away will be +// attempted to be run. // -// - endpoint: The name of the Endpoint requested to get lists of tokens and -// token ids. -func (r *EndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *EndpointsComputeTokensCall { - c := &EndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest +// - parent: The resource name of the Location to create the CustomJob in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsCustomJobsService) Create(parent string, googlecloudaiplatformv1customjob *GoogleCloudAiplatformV1CustomJob) *ProjectsLocationsCustomJobsCreateCall { + c := &ProjectsLocationsCustomJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1customjob = googlecloudaiplatformv1customjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *EndpointsComputeTokensCall) Fields(s ...googleapi.Field) *EndpointsComputeTokensCall { +func (c *ProjectsLocationsCustomJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *EndpointsComputeTokensCall) Context(ctx context.Context) *EndpointsComputeTokensCall { +func (c *ProjectsLocationsCustomJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *EndpointsComputeTokensCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *EndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCustomJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1customjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -38887,18 +42659,18 @@ func (c *EndpointsComputeTokensCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.endpoints.computeTokens" call. +// Do executes the "aiplatform.projects.locations.customJobs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1CustomJob.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 *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { +func (c *ProjectsLocationsCustomJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CustomJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38917,7 +42689,7 @@ func (c *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ret := &GoogleCloudAiplatformV1CustomJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38930,78 +42702,181 @@ func (c *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCl return ret, nil } -type EndpointsCountTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CountTokens: Perform a token counting. +// Delete: Deletes a CustomJob. // -// - endpoint: The name of the Endpoint requested to perform token counting. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *EndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *EndpointsCountTokensCall { - c := &EndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest +// - name: The name of the CustomJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/customJobs/{custom_job}`. +func (r *ProjectsLocationsCustomJobsService) Delete(name string) *ProjectsLocationsCustomJobsDeleteCall { + c := &ProjectsLocationsCustomJobsDeleteCall{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 // details. -func (c *EndpointsCountTokensCall) Fields(s ...googleapi.Field) *EndpointsCountTokensCall { +func (c *ProjectsLocationsCustomJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *EndpointsCountTokensCall) Context(ctx context.Context) *EndpointsCountTokensCall { +func (c *ProjectsLocationsCustomJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *EndpointsCountTokensCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *EndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCustomJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.customJobs.delete" call. +// 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 *ProjectsLocationsCustomJobsDeleteCall) 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 +} + +type ProjectsLocationsCustomJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a CustomJob. +// +// - name: The name of the CustomJob resource. Format: +// `projects/{project}/locations/{location}/customJobs/{custom_job}`. +func (r *ProjectsLocationsCustomJobsService) Get(name string) *ProjectsLocationsCustomJobsGetCall { + c := &ProjectsLocationsCustomJobsGetCall{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 +// details. +func (c *ProjectsLocationsCustomJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCustomJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCustomJobsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCustomJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCustomJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+endpoint}:countTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.endpoints.countTokens" call. +// Do executes the "aiplatform.projects.locations.customJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1CustomJob.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 *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { +func (c *ProjectsLocationsCustomJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CustomJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39020,7 +42895,7 @@ func (c *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CountTokensResponse{ + ret := &GoogleCloudAiplatformV1CustomJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39033,81 +42908,122 @@ func (c *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type EndpointsGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists CustomJobs in a Location. +// +// - parent: The resource name of the Location to list the CustomJobs from. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsCustomJobsService) List(parent string) *ProjectsLocationsCustomJobsListCall { + c := &ProjectsLocationsCustomJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsCustomJobsListCall) Filter(filter string) *ProjectsLocationsCustomJobsListCall { + c.urlParams_.Set("filter", filter) + return c } -// GenerateContent: Generate content with multimodal inputs. -// -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *EndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsGenerateContentCall { - c := &EndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCustomJobsListCall) PageSize(pageSize int64) *ProjectsLocationsCustomJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListCustomJobsResponse.next_page_token of the +// previous JobService.ListCustomJobs call. +func (c *ProjectsLocationsCustomJobsListCall) PageToken(pageToken string) *ProjectsLocationsCustomJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsCustomJobsListCall) ReadMask(readMask string) *ProjectsLocationsCustomJobsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *EndpointsGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsGenerateContentCall { +func (c *ProjectsLocationsCustomJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCustomJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *EndpointsGenerateContentCall) Context(ctx context.Context) *EndpointsGenerateContentCall { +func (c *ProjectsLocationsCustomJobsListCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *EndpointsGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *EndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCustomJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+model}:generateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "model": c.model, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.endpoints.generateContent" call. +// Do executes the "aiplatform.projects.locations.customJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// *GoogleCloudAiplatformV1ListCustomJobsResponse.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 *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsCustomJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListCustomJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39126,7 +43042,7 @@ func (c *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleCloudAiplatformV1ListCustomJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39139,63 +43055,81 @@ func (c *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*Google return ret, nil } -type EndpointsStreamGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsCustomJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListCustomJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// StreamGenerateContent: Generate content with multimodal inputs with -// streaming support. +type ProjectsLocationsCustomJobsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + 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`. // -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *EndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsStreamGenerateContentCall { - c := &EndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsCustomJobsOperationsService) Cancel(name string) *ProjectsLocationsCustomJobsOperationsCancelCall { + c := &ProjectsLocationsCustomJobsOperationsCancelCall{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 // details. -func (c *EndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsStreamGenerateContentCall { +func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *EndpointsStreamGenerateContentCall) Context(ctx context.Context) *EndpointsStreamGenerateContentCall { +func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *EndpointsStreamGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *EndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCustomJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39203,18 +43137,18 @@ func (c *EndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "model": c.model, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.endpoints.streamGenerateContent" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.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 *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +// *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 *ProjectsLocationsCustomJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39233,7 +43167,7 @@ func (c *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39246,128 +43180,74 @@ func (c *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type MediaUploadCall struct { - s *Service - parent string - googlecloudaiplatformv1uploadragfilerequest *GoogleCloudAiplatformV1UploadRagFileRequest - 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, googlecloudaiplatformv1uploadragfilerequest *GoogleCloudAiplatformV1UploadRagFileRequest) *MediaUploadCall { - c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1uploadragfilerequest = googlecloudaiplatformv1uploadragfilerequest - 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 +type ProjectsLocationsCustomJobsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResumableMedia specifies the media to upload in chunks and can be canceled -// with ctx. -// -// Deprecated: use Media instead. +// 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`. // -// 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) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsCustomJobsOperationsService) Delete(name string) *ProjectsLocationsCustomJobsOperationsDeleteCall { + c := &ProjectsLocationsCustomJobsOperationsDeleteCall{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 // details. -func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { +func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -// This context will supersede any context previously provided to the -// ResumableMedia method. -func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { +func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MediaUploadCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1uploadragfilerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles:upload") - if c.mediaInfo_ != nil { - urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - req.GetBody = getBody 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.media.upload" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1UploadRagFileResponse.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 *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1UploadRagFileResponse, error) { +// *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 *ProjectsLocationsCustomJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39386,24 +43266,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo 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 := &GoogleCloudAiplatformV1UploadRagFileResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39416,7 +43279,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo return ret, nil } -type ProjectsGetCacheConfigCall struct { +type ProjectsLocationsCustomJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -39425,12 +43288,13 @@ type ProjectsGetCacheConfigCall struct { header_ http.Header } -// GetCacheConfig: Gets a GenAI cache config. +// 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: Name of the cache config. Format: - -// `projects/{project}/cacheConfig`. -func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { - c := &ProjectsGetCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCustomJobsOperationsService) Get(name string) *ProjectsLocationsCustomJobsOperationsGetCall { + c := &ProjectsLocationsCustomJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -39438,7 +43302,7 @@ func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39446,27 +43310,27 @@ func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCa // IfNoneMatch sets an 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. -func (c *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetCacheConfigCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -39487,13 +43351,13 @@ func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.getCacheConfig" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CacheConfig.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CacheConfig, error) { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39512,7 +43376,7 @@ func (c *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CacheConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39525,61 +43389,87 @@ func (c *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCl return ret, nil } -type ProjectsUpdateCacheConfigCall struct { - s *Service - name string - googlecloudaiplatformv1cacheconfig *GoogleCloudAiplatformV1CacheConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateCacheConfig: Updates a cache config. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - name: Identifier. Name of the cache config. Format: - -// `projects/{project}/cacheConfig`. -func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1cacheconfig *GoogleCloudAiplatformV1CacheConfig) *ProjectsUpdateCacheConfigCall { - c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCustomJobsOperationsService) List(name string) *ProjectsLocationsCustomJobsOperationsListCall { + c := &ProjectsLocationsCustomJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1cacheconfig = googlecloudaiplatformv1cacheconfig + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCustomJobsOperationsListCall) Filter(filter string) *ProjectsLocationsCustomJobsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCustomJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCustomJobsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCustomJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCustomJobsOperationsListCall { + 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 // details. -func (c *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCustomJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsUpdateCacheConfigCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cacheconfig) - if err != nil { - return nil, err +func (c *ProjectsLocationsCustomJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -39590,13 +43480,13 @@ func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.updateCacheConfig" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.list" call. // 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 +// *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 *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCustomJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39615,7 +43505,7 @@ func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39628,61 +43518,90 @@ func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*Googl return ret, nil } -type ProjectsLocationsAugmentPromptCall struct { - s *Service - parent string - googlecloudaiplatformv1augmentpromptrequest *GoogleCloudAiplatformV1AugmentPromptRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsCustomJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// AugmentPrompt: Given an input prompt, it returns augmented prompt from -// vertex rag store to guide LLM towards generating grounded responses. +type ProjectsLocationsCustomJobsOperationsWaitCall 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. // -// - parent: The resource name of the Location from which to augment prompt. -// The users must have permission to make a call in the project. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) AugmentPrompt(parent string, googlecloudaiplatformv1augmentpromptrequest *GoogleCloudAiplatformV1AugmentPromptRequest) *ProjectsLocationsAugmentPromptCall { - c := &ProjectsLocationsAugmentPromptCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1augmentpromptrequest = googlecloudaiplatformv1augmentpromptrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsCustomJobsOperationsService) Wait(name string) *ProjectsLocationsCustomJobsOperationsWaitCall { + c := &ProjectsLocationsCustomJobsOperationsWaitCall{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 *ProjectsLocationsCustomJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsCustomJobsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsAugmentPromptCall) Fields(s ...googleapi.Field) *ProjectsLocationsAugmentPromptCall { +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAugmentPromptCall) Context(ctx context.Context) *ProjectsLocationsAugmentPromptCall { +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAugmentPromptCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAugmentPromptCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1augmentpromptrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:augmentPrompt") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39690,18 +43609,18 @@ func (c *ProjectsLocationsAugmentPromptCall) doRequest(alt string) (*http.Respon } 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.augmentPrompt" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AugmentPromptResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AugmentPromptResponse, error) { +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39720,7 +43639,7 @@ func (c *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1AugmentPromptResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39733,62 +43652,61 @@ func (c *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsCorroborateContentCall struct { - s *Service - parent string - googlecloudaiplatformv1corroboratecontentrequest *GoogleCloudAiplatformV1CorroborateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataLabelingJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1canceldatalabelingjobrequest *GoogleCloudAiplatformV1CancelDataLabelingJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CorroborateContent: Given an input text, it returns a score that evaluates -// the factuality of the text. It also extracts and returns claims from the -// text and provides supporting facts. +// Cancel: Cancels a DataLabelingJob. Success of cancellation is not +// guaranteed. // -// - parent: The resource name of the Location from which to corroborate text. -// The users must have permission to make a call in the project. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) CorroborateContent(parent string, googlecloudaiplatformv1corroboratecontentrequest *GoogleCloudAiplatformV1CorroborateContentRequest) *ProjectsLocationsCorroborateContentCall { - c := &ProjectsLocationsCorroborateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1corroboratecontentrequest = googlecloudaiplatformv1corroboratecontentrequest +// - name: The name of the DataLabelingJob. Format: +// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo +// b}`. +func (r *ProjectsLocationsDataLabelingJobsService) Cancel(name string, googlecloudaiplatformv1canceldatalabelingjobrequest *GoogleCloudAiplatformV1CancelDataLabelingJobRequest) *ProjectsLocationsDataLabelingJobsCancelCall { + c := &ProjectsLocationsDataLabelingJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1canceldatalabelingjobrequest = googlecloudaiplatformv1canceldatalabelingjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCorroborateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCorroborateContentCall { +func (c *ProjectsLocationsDataLabelingJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCorroborateContentCall) Context(ctx context.Context) *ProjectsLocationsCorroborateContentCall { +func (c *ProjectsLocationsDataLabelingJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCorroborateContentCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCorroborateContentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1corroboratecontentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1canceldatalabelingjobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:corroborateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39796,18 +43714,18 @@ func (c *ProjectsLocationsCorroborateContentCall) doRequest(alt string) (*http.R } 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.corroborateContent" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CorroborateContentResponse.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 *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CorroborateContentResponse, error) { +// *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 *ProjectsLocationsDataLabelingJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39826,7 +43744,7 @@ func (c *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CorroborateContentResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39839,59 +43757,59 @@ func (c *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsEvaluateInstancesCall struct { - s *Service - location string - googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataLabelingJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1datalabelingjob *GoogleCloudAiplatformV1DataLabelingJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EvaluateInstances: Evaluates instances based on a given metric. +// Create: Creates a DataLabelingJob. // -// - location: The resource name of the Location to evaluate the instances. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { - c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest +// - parent: The parent of the DataLabelingJob. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDataLabelingJobsService) Create(parent string, googlecloudaiplatformv1datalabelingjob *GoogleCloudAiplatformV1DataLabelingJob) *ProjectsLocationsDataLabelingJobsCreateCall { + c := &ProjectsLocationsDataLabelingJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1datalabelingjob = googlecloudaiplatformv1datalabelingjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1evaluateinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datalabelingjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataLabelingJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39899,18 +43817,18 @@ func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.evaluateInstances" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1EvaluateInstancesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1DataLabelingJob.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 *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, error) { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DataLabelingJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39929,7 +43847,7 @@ func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + ret := &GoogleCloudAiplatformV1DataLabelingJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39942,20 +43860,21 @@ func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataLabelingJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// Delete: Deletes a DataLabelingJob. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DataLabelingJob to be deleted. Format: +// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo +// b}`. +func (r *ProjectsLocationsDataLabelingJobsService) Delete(name string) *ProjectsLocationsDataLabelingJobsDeleteCall { + c := &ProjectsLocationsDataLabelingJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -39963,45 +43882,34 @@ func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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 } @@ -40012,13 +43920,13 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.get" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40037,7 +43945,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationLocation{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40050,7 +43958,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type ProjectsLocationsListCall struct { +type ProjectsLocationsDataLabelingJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -40059,43 +43967,21 @@ type ProjectsLocationsListCall struct { header_ http.Header } -// List: Lists information about the supported locations for this service. +// Get: Gets a DataLabelingJob. // -// - name: The resource that owns the locations collection, if applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DataLabelingJob. Format: +// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo +// b}`. +func (r *ProjectsLocationsDataLabelingJobsService) Get(name string) *ProjectsLocationsDataLabelingJobsGetCall { + c := &ProjectsLocationsDataLabelingJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": A filter to narrow down results -// to a preferred subset. The filtering language accepts strings like -// "displayName=tokyo", and is documented in more detail in AIP-160 -// (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token received -// from the `next_page_token` field in the response. Send that page token to -// receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - 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 // details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDataLabelingJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40103,27 +43989,27 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // IfNoneMatch sets an 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. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDataLabelingJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDataLabelingJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -40131,7 +44017,7 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -40144,13 +44030,13 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.list" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1DataLabelingJob.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { +func (c *ProjectsLocationsDataLabelingJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DataLabelingJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40169,7 +44055,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &GoogleCloudAiplatformV1DataLabelingJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40182,211 +44068,132 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo return ret, nil } -// 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsRetrieveContextsCall struct { - s *Service - parent string - googlecloudaiplatformv1retrievecontextsrequest *GoogleCloudAiplatformV1RetrieveContextsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataLabelingJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RetrieveContexts: Retrieves relevant contexts for a query. +// List: Lists DataLabelingJobs in a Location. // -// - 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, googlecloudaiplatformv1retrievecontextsrequest *GoogleCloudAiplatformV1RetrieveContextsRequest) *ProjectsLocationsRetrieveContextsCall { - c := &ProjectsLocationsRetrieveContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent of the DataLabelingJob. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDataLabelingJobsService) List(parent string) *ProjectsLocationsDataLabelingJobsListCall { + c := &ProjectsLocationsDataLabelingJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1retrievecontextsrequest = googlecloudaiplatformv1retrievecontextsrequest return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsRetrieveContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRetrieveContextsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsDataLabelingJobsListCall) Filter(filter string) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("filter", filter) return c } -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRetrieveContextsCall) Context(ctx context.Context) *ProjectsLocationsRetrieveContextsCall { - c.ctx_ = ctx +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order by default. Use `desc` after a +// field name for descending. +func (c *ProjectsLocationsDataLabelingJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// Header returns a http.Header that can be modified by the caller to add -// 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1retrievecontextsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RetrieveContextsResponse.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 *ProjectsLocationsRetrieveContextsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RetrieveContextsResponse, 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 := &GoogleCloudAiplatformV1RetrieveContextsResponse{ - 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 +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDataLabelingJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -type ProjectsLocationsBatchPredictionJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDataLabelingJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// Cancel: Cancels a BatchPredictionJob. Starts asynchronous cancellation on -// the BatchPredictionJob. The server makes the best effort to cancel the job, -// but success is not guaranteed. Clients can use -// JobService.GetBatchPredictionJob or other methods to check whether the -// cancellation succeeded or whether the job completed despite cancellation. On -// a successful cancellation, the BatchPredictionJob is not deleted;instead its -// BatchPredictionJob.state is set to `CANCELLED`. Any files already outputted -// by the job are not deleted. -// -// - name: The name of the BatchPredictionJob to cancel. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Cancel(name string, googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest) *ProjectsLocationsBatchPredictionJobsCancelCall { - c := &ProjectsLocationsBatchPredictionJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1cancelbatchpredictionjobrequest = googlecloudaiplatformv1cancelbatchpredictionjobrequest +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. FieldMask represents a set of symbolic field paths. For +// example, the mask can be `paths: "name". The "name" here is a field in +// DataLabelingJob. If this field is not set, all fields of the DataLabelingJob +// are returned. +func (c *ProjectsLocationsDataLabelingJobsListCall) ReadMask(readMask string) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCancelCall { +func (c *ProjectsLocationsDataLabelingJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDataLabelingJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCancelCall { +func (c *ProjectsLocationsDataLabelingJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelbatchpredictionjobrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataLabelingJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataLabelingJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.cancel" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.list" call. // 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 *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListDataLabelingJobsResponse.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 *ProjectsLocationsDataLabelingJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDataLabelingJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40405,7 +44212,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListDataLabelingJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40418,60 +44225,81 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsDataLabelingJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDataLabelingJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Create: Creates a BatchPredictionJob. A BatchPredictionJob once created will -// right away be attempted to start. -// -// - parent: The resource name of the Location to create the BatchPredictionJob -// in. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Create(parent string, googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob) *ProjectsLocationsBatchPredictionJobsCreateCall { - c := &ProjectsLocationsBatchPredictionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchpredictionjob = googlecloudaiplatformv1batchpredictionjob +type ProjectsLocationsDataLabelingJobsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + 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`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) Cancel(name string) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { + c := &ProjectsLocationsDataLabelingJobsOperationsCancelCall{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 // details. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCreateCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCreateCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchpredictionjob) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -40479,18 +44307,18 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) ( } 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.batchPredictionJobs.create" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1BatchPredictionJob.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 *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { +// *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 *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40509,7 +44337,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1BatchPredictionJob{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40522,7 +44350,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsDeleteCall struct { +type ProjectsLocationsDataLabelingJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -40530,14 +44358,14 @@ type ProjectsLocationsBatchPredictionJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a BatchPredictionJob. Can only be called on jobs that -// already finished. +// 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 BatchPredictionJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *ProjectsLocationsBatchPredictionJobsDeleteCall { - c := &ProjectsLocationsBatchPredictionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) Delete(name string) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { + c := &ProjectsLocationsDataLabelingJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -40545,27 +44373,27 @@ func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsDeleteCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsDeleteCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -40583,13 +44411,13 @@ func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.delete" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.delete" call. // 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 *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40608,7 +44436,7 @@ func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.Ca 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, @@ -40621,7 +44449,7 @@ func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsGetCall struct { +type ProjectsLocationsDataLabelingJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -40630,13 +44458,13 @@ type ProjectsLocationsBatchPredictionJobsGetCall struct { header_ http.Header } -// Get: Gets a BatchPredictionJob +// 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 BatchPredictionJob resource. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Get(name string) *ProjectsLocationsBatchPredictionJobsGetCall { - c := &ProjectsLocationsBatchPredictionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) Get(name string) *ProjectsLocationsDataLabelingJobsOperationsGetCall { + c := &ProjectsLocationsDataLabelingJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -40644,7 +44472,7 @@ func (r *ProjectsLocationsBatchPredictionJobsService) Get(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsGetCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40652,27 +44480,27 @@ func (c *ProjectsLocationsBatchPredictionJobsGetCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an 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. -func (c *ProjectsLocationsBatchPredictionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchPredictionJobsGetCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsGetCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -40693,13 +44521,13 @@ func (c *ProjectsLocationsBatchPredictionJobsGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.get" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1BatchPredictionJob.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsBatchPredictionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40718,7 +44546,7 @@ func (c *ProjectsLocationsBatchPredictionJobsGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1BatchPredictionJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40731,68 +44559,49 @@ func (c *ProjectsLocationsBatchPredictionJobsGetCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsBatchPredictionJobsListCall struct { +type ProjectsLocationsDataLabelingJobsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists BatchPredictionJobs in a Location. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Location to list the BatchPredictionJobs -// from. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsBatchPredictionJobsService) List(parent string) *ProjectsLocationsBatchPredictionJobsListCall { - c := &ProjectsLocationsBatchPredictionJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) List(name string) *ProjectsLocationsDataLabelingJobsOperationsListCall { + c := &ProjectsLocationsDataLabelingJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `model_display_name` supports `=`, `!=` comparisons. * `state` -// supports `=`, `!=` comparisons. * `create_time` supports `=`, `!=`,`<`, -// `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 format. * -// `labels` supports general map functions that is: `labels.key=value` - -// key:value equality `labels.key:* - key existence Some examples of using the -// filter are: * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*" * -// `state!="JOB_STATE_FAILED" OR display_name="my_job" * `NOT -// display_name="my_job" * `create_time>"2021-05-18T00:00:00Z" * -// `labels.keyA=valueA` * `labels.keyB:*` -func (c *ProjectsLocationsBatchPredictionJobsListCall) Filter(filter string) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Filter(filter string) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsBatchPredictionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListBatchPredictionJobsResponse.next_page_token of the previous -// JobService.ListBatchPredictionJobs call. -func (c *ProjectsLocationsBatchPredictionJobsListCall) PageToken(pageToken string) *ProjectsLocationsBatchPredictionJobsListCall { +// token. +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsBatchPredictionJobsListCall) ReadMask(readMask string) *ProjectsLocationsBatchPredictionJobsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40800,27 +44609,27 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) Fields(s ...googleapi.Fie // IfNoneMatch sets an 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. -func (c *ProjectsLocationsBatchPredictionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsListCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -40828,7 +44637,7 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -40836,20 +44645,18 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) doRequest(alt string) (*h } 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.batchPredictionJobs.list" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListBatchPredictionJobsResponse.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 +// *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 *ProjectsLocationsBatchPredictionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListBatchPredictionJobsResponse, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40868,7 +44675,7 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListBatchPredictionJobsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40884,7 +44691,7 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) Do(opts ...googleapi.Call // 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 *ProjectsLocationsBatchPredictionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListBatchPredictionJobsResponse) error) error { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -40902,110 +44709,7 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) Pages(ctx context.Context } } -type ProjectsLocationsCachedContentsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates cached content, this call will initialize the cached content -// in the data storage, and users need to pay for the cache data storage. -// -// - parent: The parent resource where the cached content will be created. -func (r *ProjectsLocationsCachedContentsService) Create(parent string, googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent) *ProjectsLocationsCachedContentsCreateCall { - c := &ProjectsLocationsCachedContentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1cachedcontent = googlecloudaiplatformv1cachedcontent - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCachedContentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCachedContentsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCachedContentsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cachedcontent) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cachedContents") - 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.cachedContents.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CachedContent.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 *ProjectsLocationsCachedContentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, 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 := &GoogleCloudAiplatformV1CachedContent{ - 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 -} - -type ProjectsLocationsCachedContentsDeleteCall struct { +type ProjectsLocationsDataLabelingJobsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -41013,46 +44717,63 @@ type ProjectsLocationsCachedContentsDeleteCall struct { header_ http.Header } -// Delete: Deletes cached content +// 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 resource name referring to the cached content. -func (r *ProjectsLocationsCachedContentsService) Delete(name string) *ProjectsLocationsCachedContentsDeleteCall { - c := &ProjectsLocationsCachedContentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) Wait(name string) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { + c := &ProjectsLocationsDataLabelingJobsOperationsWaitCall{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 *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsCachedContentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsDeleteCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsDeleteCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCachedContentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCachedContentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -41063,13 +44784,13 @@ func (c *ProjectsLocationsCachedContentsDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.cachedContents.delete" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.wait" call. // 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 *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41088,7 +44809,7 @@ func (c *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOpt 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, @@ -41101,83 +44822,78 @@ func (c *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsCachedContentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets cached content configurations +// Create: Creates a Dataset. // -// - name: The resource name referring to the cached content. -func (r *ProjectsLocationsCachedContentsService) Get(name string) *ProjectsLocationsCachedContentsGetCall { - c := &ProjectsLocationsCachedContentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the Dataset in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDatasetsService) Create(parent string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsCreateCall { + c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCachedContentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsGetCall { +func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsCachedContentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCachedContentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsGetCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsGetCall { +func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCachedContentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCachedContentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.cachedContents.get" call. +// Do executes the "aiplatform.projects.locations.datasets.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CachedContent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCachedContentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { +func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41196,7 +44912,7 @@ func (c *ProjectsLocationsCachedContentsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CachedContent{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41209,101 +44925,72 @@ func (c *ProjectsLocationsCachedContentsGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsCachedContentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists cached contents in a project +// Delete: Deletes a Dataset. // -// - parent: The parent, which owns this collection of cached contents. -func (r *ProjectsLocationsCachedContentsService) List(parent string) *ProjectsLocationsCachedContentsListCall { - c := &ProjectsLocationsCachedContentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// cached contents to return. The service may return fewer than this value. If -// unspecified, some default (under maximum) number of items will be returned. -// The maximum value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsCachedContentsListCall) PageSize(pageSize int64) *ProjectsLocationsCachedContentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListCachedContents` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListCachedContents` must match the call that provided the page token. -func (c *ProjectsLocationsCachedContentsListCall) PageToken(pageToken string) *ProjectsLocationsCachedContentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Dataset to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall { + c := &ProjectsLocationsDatasetsDeleteCall{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 // details. -func (c *ProjectsLocationsCachedContentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsListCall { +func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsCachedContentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCachedContentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsListCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsListCall { +func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCachedContentsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCachedContentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/cachedContents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } 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.cachedContents.list" call. +// Do executes the "aiplatform.projects.locations.datasets.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListCachedContentsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCachedContentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListCachedContentsResponse, error) { +func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41322,103 +45009,74 @@ func (c *ProjectsLocationsCachedContentsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListCachedContentsResponse{ - 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 -} - -// 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 *ProjectsLocationsCachedContentsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListCachedContentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } + 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 } -type ProjectsLocationsCachedContentsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsExportCall struct { + s *Service + name string + googlecloudaiplatformv1exportdatarequest *GoogleCloudAiplatformV1ExportDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates cached content configurations +// Export: Exports data from a Dataset. // -// - name: Immutable. Identifier. The server-generated resource name of the -// cached content Format: -// projects/{project}/locations/{location}/cachedContents/{cached_content}. -func (r *ProjectsLocationsCachedContentsService) Patch(name string, googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent) *ProjectsLocationsCachedContentsPatchCall { - c := &ProjectsLocationsCachedContentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsService) Export(name string, googlecloudaiplatformv1exportdatarequest *GoogleCloudAiplatformV1ExportDataRequest) *ProjectsLocationsDatasetsExportCall { + c := &ProjectsLocationsDatasetsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1cachedcontent = googlecloudaiplatformv1cachedcontent - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsCachedContentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCachedContentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googlecloudaiplatformv1exportdatarequest = googlecloudaiplatformv1exportdatarequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCachedContentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsPatchCall { +func (c *ProjectsLocationsDatasetsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsExportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsPatchCall { +func (c *ProjectsLocationsDatasetsExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsExportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCachedContentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsExportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCachedContentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cachedcontent) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportdatarequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -41429,13 +45087,13 @@ func (c *ProjectsLocationsCachedContentsPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.cachedContents.patch" call. +// Do executes the "aiplatform.projects.locations.datasets.export" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CachedContent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCachedContentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { +func (c *ProjectsLocationsDatasetsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41454,7 +45112,7 @@ func (c *ProjectsLocationsCachedContentsPatchCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CachedContent{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41467,68 +45125,73 @@ func (c *ProjectsLocationsCachedContentsPatchCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsCustomJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelcustomjobrequest *GoogleCloudAiplatformV1CancelCustomJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a CustomJob. Starts asynchronous cancellation on the -// CustomJob. The server makes a best effort to cancel the job, but success is -// not guaranteed. Clients can use JobService.GetCustomJob or other methods to -// check whether the cancellation succeeded or whether the job completed -// despite cancellation. On successful cancellation, the CustomJob is not -// deleted; instead it becomes a job with a CustomJob.error value with a -// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and -// CustomJob.state is set to `CANCELLED`. +// Get: Gets a Dataset. // -// - name: The name of the CustomJob to cancel. Format: -// `projects/{project}/locations/{location}/customJobs/{custom_job}`. -func (r *ProjectsLocationsCustomJobsService) Cancel(name string, googlecloudaiplatformv1cancelcustomjobrequest *GoogleCloudAiplatformV1CancelCustomJobRequest) *ProjectsLocationsCustomJobsCancelCall { - c := &ProjectsLocationsCustomJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Dataset resource. +func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall { + c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1cancelcustomjobrequest = googlecloudaiplatformv1cancelcustomjobrequest + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsGetCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsCancelCall { +func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsCancelCall { +func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelcustomjobrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -41539,13 +45202,13 @@ func (c *ProjectsLocationsCustomJobsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.get" call. // 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 *ProjectsLocationsCustomJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1Dataset.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 *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41564,7 +45227,7 @@ func (c *ProjectsLocationsCustomJobsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1Dataset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41577,60 +45240,59 @@ func (c *ProjectsLocationsCustomJobsCancelCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsCustomJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1customjob *GoogleCloudAiplatformV1CustomJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsImportCall struct { + s *Service + name string + googlecloudaiplatformv1importdatarequest *GoogleCloudAiplatformV1ImportDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a CustomJob. A created CustomJob right away will be -// attempted to be run. +// Import: Imports data into a Dataset. // -// - parent: The resource name of the Location to create the CustomJob in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsCustomJobsService) Create(parent string, googlecloudaiplatformv1customjob *GoogleCloudAiplatformV1CustomJob) *ProjectsLocationsCustomJobsCreateCall { - c := &ProjectsLocationsCustomJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1customjob = googlecloudaiplatformv1customjob +// - name: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsService) Import(name string, googlecloudaiplatformv1importdatarequest *GoogleCloudAiplatformV1ImportDataRequest) *ProjectsLocationsDatasetsImportCall { + c := &ProjectsLocationsDatasetsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1importdatarequest = googlecloudaiplatformv1importdatarequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsCreateCall { +func (c *ProjectsLocationsDatasetsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsCreateCall { +func (c *ProjectsLocationsDatasetsImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1customjob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importdatarequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -41638,18 +45300,18 @@ func (c *ProjectsLocationsCustomJobsCreateCall) 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.customJobs.create" call. +// Do executes the "aiplatform.projects.locations.datasets.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CustomJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCustomJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CustomJob, error) { +func (c *ProjectsLocationsDatasetsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41668,7 +45330,7 @@ func (c *ProjectsLocationsCustomJobsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CustomJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41681,72 +45343,126 @@ func (c *ProjectsLocationsCustomJobsCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsCustomJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a CustomJob. +// List: Lists Datasets in a Location. // -// - name: The name of the CustomJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/customJobs/{custom_job}`. -func (r *ProjectsLocationsCustomJobsService) Delete(name string) *ProjectsLocationsCustomJobsDeleteCall { - c := &ProjectsLocationsCustomJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The name of the Dataset's parent resource. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall { + c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `display_name`: supports = and != * `metadata_schema_uri`: +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" +func (c *ProjectsLocationsDatasetsListCall) Filter(filter string) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` +func (c *ProjectsLocationsDatasetsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsDeleteCall { +func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsDeleteCall { +func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.list" call. // 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 +// *GoogleCloudAiplatformV1ListDatasetsResponse.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 *ProjectsLocationsCustomJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41765,7 +45481,7 @@ func (c *ProjectsLocationsCustomJobsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListDatasetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41778,67 +45494,90 @@ func (c *ProjectsLocationsCustomJobsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsCustomJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Get: Gets a CustomJob. +type ProjectsLocationsDatasetsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Dataset. // -// - name: The name of the CustomJob resource. Format: -// `projects/{project}/locations/{location}/customJobs/{custom_job}`. -func (r *ProjectsLocationsCustomJobsService) Get(name string) *ProjectsLocationsCustomJobsGetCall { - c := &ProjectsLocationsCustomJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Identifier. The resource name of the Dataset. +func (r *ProjectsLocationsDatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsPatchCall { + c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` * +// `description` * `labels` +func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsGetCall { +func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsCustomJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsGetCall { +func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -41849,13 +45588,13 @@ func (c *ProjectsLocationsCustomJobsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.get" call. +// Do executes the "aiplatform.projects.locations.datasets.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CustomJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Dataset.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 *ProjectsLocationsCustomJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CustomJob, error) { +func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41874,7 +45613,7 @@ func (c *ProjectsLocationsCustomJobsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CustomJob{ + ret := &GoogleCloudAiplatformV1Dataset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41887,67 +45626,142 @@ func (c *ProjectsLocationsCustomJobsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsCustomJobsListCall struct { +type ProjectsLocationsDatasetsSearchDataItemsCall struct { s *Service - parent string + dataset string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists CustomJobs in a Location. +// SearchDataItems: Searches DataItems in a Dataset. // -// - parent: The resource name of the Location to list the CustomJobs from. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsCustomJobsService) List(parent string) *ProjectsLocationsCustomJobsListCall { - c := &ProjectsLocationsCustomJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - dataset: The resource name of the Dataset from which to search DataItems. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsService) SearchDataItems(dataset string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c := &ProjectsLocationsDatasetsSearchDataItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataset = dataset return c } -// Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsCustomJobsListCall) Filter(filter string) *ProjectsLocationsCustomJobsListCall { - c.urlParams_.Set("filter", filter) +// AnnotationFilters sets the optional parameter "annotationFilters": An +// expression that specifies what Annotations will be returned per DataItem. +// Annotations satisfied either of the conditions will be returned. * +// `annotation_spec_id` - for = or !=. Must specify `saved_query_id=` - saved +// query id that annotations should belong to. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationFilters(annotationFilters ...string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.SetMulti("annotationFilters", append([]string{}, annotationFilters...)) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCustomJobsListCall) PageSize(pageSize int64) *ProjectsLocationsCustomJobsListCall { +// AnnotationsFilter sets the optional parameter "annotationsFilter": An +// expression for filtering the Annotations that will be returned per DataItem. +// * `annotation_spec_id` - for = or !=. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationsFilter(annotationsFilter string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("annotationsFilter", annotationsFilter) + return c +} + +// AnnotationsLimit sets the optional parameter "annotationsLimit": If set, +// only up to this many of Annotations will be returned per DataItemView. The +// maximum value is 1000. If not set, the maximum value will be used. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationsLimit(annotationsLimit int64) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("annotationsLimit", fmt.Sprint(annotationsLimit)) + return c +} + +// DataItemFilter sets the optional parameter "dataItemFilter": An expression +// for filtering the DataItem that will be returned. * `data_item_id` - for = +// or !=. * `labeled` - for = or !=. * `has_annotation(ANNOTATION_SPEC_ID)` - +// true only for DataItem that have at least one annotation with +// annotation_spec_id = `ANNOTATION_SPEC_ID` in the context of SavedQuery or +// DataLabelingJob. For example: * `data_item=1` * `has_annotation(5)` +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) DataItemFilter(dataItemFilter string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("dataItemFilter", dataItemFilter) + return c +} + +// DataLabelingJob sets the optional parameter "dataLabelingJob": The resource +// name of a DataLabelingJob. Format: +// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} +// ` If this field is set, all of the search will be done in the context of +// this DataLabelingJob. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) DataLabelingJob(dataLabelingJob string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("dataLabelingJob", dataLabelingJob) + return c +} + +// FieldMask sets the optional parameter "fieldMask": Mask specifying which +// fields of DataItemView to read. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) FieldMask(fieldMask string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("fieldMask", fieldMask) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// OrderByAnnotationOrderBy sets the optional parameter +// "orderByAnnotation.orderBy": A comma-separated list of annotation fields to +// order by, sorted in ascending order. Use "desc" after a field name for +// descending. Must also specify saved_query. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByAnnotationOrderBy(orderByAnnotationOrderBy string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("orderByAnnotation.orderBy", orderByAnnotationOrderBy) + return c +} + +// OrderByAnnotationSavedQuery sets the optional parameter +// "orderByAnnotation.savedQuery": Required. Saved query of the Annotation. +// Only Annotations belong to this saved query will be considered for ordering. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByAnnotationSavedQuery(orderByAnnotationSavedQuery string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("orderByAnnotation.savedQuery", orderByAnnotationSavedQuery) + return c +} + +// OrderByDataItem sets the optional parameter "orderByDataItem": A +// comma-separated list of data item fields to order by, sorted in ascending +// order. Use "desc" after a field name for descending. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByDataItem(orderByDataItem string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("orderByDataItem", orderByDataItem) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer results than requested. Default and maximum page size is +// 100. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSearchDataItemsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListCustomJobsResponse.next_page_token of the -// previous JobService.ListCustomJobs call. -func (c *ProjectsLocationsCustomJobsListCall) PageToken(pageToken string) *ProjectsLocationsCustomJobsListCall { +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results for the server to return Typically obtained via +// SearchDataItemsResponse.next_page_token of the previous +// DatasetService.SearchDataItems call. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSearchDataItemsCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsCustomJobsListCall) ReadMask(readMask string) *ProjectsLocationsCustomJobsListCall { - c.urlParams_.Set("readMask", readMask) +// SavedQuery sets the optional parameter "savedQuery": The resource name of a +// SavedQuery(annotation set in UI). Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{sav +// ed_query}` All of the search will be done in the context of this SavedQuery. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) SavedQuery(savedQuery string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("savedQuery", savedQuery) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsListCall { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSearchDataItemsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -41955,27 +45769,27 @@ func (c *ProjectsLocationsCustomJobsListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an 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. -func (c *ProjectsLocationsCustomJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsListCall { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSearchDataItemsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsListCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsListCall { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSearchDataItemsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -41983,7 +45797,7 @@ func (c *ProjectsLocationsCustomJobsListCall) 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, "v1/{+parent}/customJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+dataset}:searchDataItems") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -41991,18 +45805,18 @@ func (c *ProjectsLocationsCustomJobsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "dataset": c.dataset, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.list" call. +// Do executes the "aiplatform.projects.locations.datasets.searchDataItems" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListCustomJobsResponse.ServerResponse.Header or (if +// *GoogleCloudAiplatformV1SearchDataItemsResponse.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 *ProjectsLocationsCustomJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListCustomJobsResponse, error) { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchDataItemsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42021,7 +45835,7 @@ func (c *ProjectsLocationsCustomJobsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListCustomJobsResponse{ + ret := &GoogleCloudAiplatformV1SearchDataItemsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42037,7 +45851,7 @@ func (c *ProjectsLocationsCustomJobsListCall) 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 *ProjectsLocationsCustomJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListCustomJobsResponse) error) error { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchDataItemsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -42055,62 +45869,75 @@ func (c *ProjectsLocationsCustomJobsListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsCustomJobsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsAnnotationSpecsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + 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`. +// Get: Gets an AnnotationSpec. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsCustomJobsOperationsService) Cancel(name string) *ProjectsLocationsCustomJobsOperationsCancelCall { - c := &ProjectsLocationsCustomJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the AnnotationSpec resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs +// /{annotation_spec}`. +func (r *ProjectsLocationsDatasetsAnnotationSpecsService) Get(name string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -42121,13 +45948,13 @@ func (c *ProjectsLocationsCustomJobsOperationsCancelCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.get" call. // 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 *ProjectsLocationsCustomJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1AnnotationSpec.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 *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AnnotationSpec, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42146,7 +45973,7 @@ func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1AnnotationSpec{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42159,7 +45986,7 @@ func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsCustomJobsOperationsDeleteCall struct { +type ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -42167,14 +45994,19 @@ type ProjectsLocationsCustomJobsOperationsDeleteCall struct { 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`. +// 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`. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsCustomJobsOperationsService) Delete(name string) *ProjectsLocationsCustomJobsOperationsDeleteCall { - c := &ProjectsLocationsCustomJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -42182,34 +46014,34 @@ func (r *ProjectsLocationsCustomJobsOperationsService) Delete(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -42220,13 +46052,13 @@ func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.cancel" call. // 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 *ProjectsLocationsCustomJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42258,22 +46090,22 @@ func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsCustomJobsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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. +// 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. -func (r *ProjectsLocationsCustomJobsOperationsService) Get(name string) *ProjectsLocationsCustomJobsOperationsGetCall { - c := &ProjectsLocationsCustomJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Delete(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -42281,45 +46113,34 @@ func (r *ProjectsLocationsCustomJobsOperationsService) Get(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsCustomJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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 } @@ -42330,13 +46151,13 @@ func (c *ProjectsLocationsCustomJobsOperationsGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.delete" call. // 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 *ProjectsLocationsCustomJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42355,7 +46176,7 @@ func (c *ProjectsLocationsCustomJobsOperationsGetCall) Do(opts ...googleapi.Call 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, @@ -42368,7 +46189,7 @@ func (c *ProjectsLocationsCustomJobsOperationsGetCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsCustomJobsOperationsListCall struct { +type ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -42377,40 +46198,21 @@ type ProjectsLocationsCustomJobsOperationsListCall struct { 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`. +// 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's parent resource. -func (r *ProjectsLocationsCustomJobsOperationsService) List(name string) *ProjectsLocationsCustomJobsOperationsListCall { - c := &ProjectsLocationsCustomJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Get(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCustomJobsOperationsListCall) Filter(filter string) *ProjectsLocationsCustomJobsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCustomJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCustomJobsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCustomJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCustomJobsOperationsListCall { - 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 // details. -func (c *ProjectsLocationsCustomJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42418,27 +46220,27 @@ func (c *ProjectsLocationsCustomJobsOperationsListCall) Fields(s ...googleapi.Fi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsCustomJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -42446,7 +46248,7 @@ func (c *ProjectsLocationsCustomJobsOperationsListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -42459,147 +46261,13 @@ func (c *ProjectsLocationsCustomJobsOperationsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.operations.list" call. -// 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 *ProjectsLocationsCustomJobsOperationsListCall) 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 -} - -// 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 *ProjectsLocationsCustomJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsCustomJobsOperationsWaitCall 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 *ProjectsLocationsCustomJobsOperationsService) Wait(name string) *ProjectsLocationsCustomJobsOperationsWaitCall { - c := &ProjectsLocationsCustomJobsOperationsWaitCall{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 *ProjectsLocationsCustomJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsCustomJobsOperationsWaitCall { - 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 -// details. -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.customJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.get" call. // 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 *ProjectsLocationsCustomJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42631,183 +46299,104 @@ func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataLabelingJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1canceldatalabelingjobrequest *GoogleCloudAiplatformV1CancelDataLabelingJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a DataLabelingJob. Success of cancellation is not -// guaranteed. +// 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 DataLabelingJob. Format: -// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo -// b}`. -func (r *ProjectsLocationsDataLabelingJobsService) Cancel(name string, googlecloudaiplatformv1canceldatalabelingjobrequest *GoogleCloudAiplatformV1CancelDataLabelingJobRequest) *ProjectsLocationsDataLabelingJobsCancelCall { - c := &ProjectsLocationsDataLabelingJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) List(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1canceldatalabelingjobrequest = googlecloudaiplatformv1canceldatalabelingjobrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsDataLabelingJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsCancelCall { - c.ctx_ = ctx return c } - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDataLabelingJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataLabelingJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1canceldatalabelingjobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.dataLabelingJobs.cancel" call. -// 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 *ProjectsLocationsDataLabelingJobsCancelCall) 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 + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c } -type ProjectsLocationsDataLabelingJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1datalabelingjob *GoogleCloudAiplatformV1DataLabelingJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Create: Creates a DataLabelingJob. -// -// - parent: The parent of the DataLabelingJob. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDataLabelingJobsService) Create(parent string, googlecloudaiplatformv1datalabelingjob *GoogleCloudAiplatformV1DataLabelingJob) *ProjectsLocationsDataLabelingJobsCreateCall { - c := &ProjectsLocationsDataLabelingJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1datalabelingjob = googlecloudaiplatformv1datalabelingjob +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + 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 // details. -func (c *ProjectsLocationsDataLabelingJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsCreateCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsCreateCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datalabelingjob) - if err != nil { - return nil, err +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+parent}/dataLabelingJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.create" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DataLabelingJob.ServerResponse.Header or (if a +// *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 *ProjectsLocationsDataLabelingJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DataLabelingJob, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42826,7 +46415,7 @@ func (c *ProjectsLocationsDataLabelingJobsCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DataLabelingJob{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42839,7 +46428,28 @@ func (c *ProjectsLocationsDataLabelingJobsCreateCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsDataLabelingJobsDeleteCall struct { +// 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -42847,48 +46457,63 @@ type ProjectsLocationsDataLabelingJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a DataLabelingJob. +// 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 DataLabelingJob to be deleted. Format: -// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo -// b}`. -func (r *ProjectsLocationsDataLabelingJobsService) Delete(name string) *ProjectsLocationsDataLabelingJobsDeleteCall { - c := &ProjectsLocationsDataLabelingJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Wait(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall{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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsDeleteCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsDeleteCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -42899,13 +46524,13 @@ func (c *ProjectsLocationsDataLabelingJobsDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.wait" call. // 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 *ProjectsLocationsDataLabelingJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42937,30 +46562,64 @@ func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsDataLabelingJobsGetCall struct { +type ProjectsLocationsDatasetsDataItemsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a DataLabelingJob. +// List: Lists DataItems in a Dataset. // -// - name: The name of the DataLabelingJob. Format: -// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo -// b}`. -func (r *ProjectsLocationsDataLabelingJobsService) Get(name string) *ProjectsLocationsDataLabelingJobsGetCall { - c := &ProjectsLocationsDataLabelingJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Dataset to list DataItems from. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsDataItemsService) List(parent string) *ProjectsLocationsDatasetsDataItemsListCall { + c := &ProjectsLocationsDatasetsDataItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDatasetsDataItemsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *ProjectsLocationsDatasetsDataItemsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsDataItemsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsDataItemsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsDataItemsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42968,27 +46627,27 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDataLabelingJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -42996,7 +46655,7 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataItems") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -43004,18 +46663,18 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.get" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DataLabelingJob.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ListDataItemsResponse.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 *ProjectsLocationsDataLabelingJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DataLabelingJob, error) { +func (c *ProjectsLocationsDatasetsDataItemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDataItemsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43034,7 +46693,7 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DataLabelingJob{ + ret := &GoogleCloudAiplatformV1ListDataItemsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43047,7 +46706,28 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsDataLabelingJobsListCall struct { +// 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 *ProjectsLocationsDatasetsDataItemsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDataItemsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsDatasetsDataItemsAnnotationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -43056,60 +46736,51 @@ type ProjectsLocationsDataLabelingJobsListCall struct { header_ http.Header } -// List: Lists DataLabelingJobs in a Location. +// List: Lists Annotations belongs to a dataitem This RPC is only available in +// InternalDatasetService. It is only used for exporting conversation data to +// CCAI Insights. // -// - parent: The parent of the DataLabelingJob. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDataLabelingJobsService) List(parent string) *ProjectsLocationsDataLabelingJobsListCall { - c := &ProjectsLocationsDataLabelingJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the DataItem to list Annotations from. +// Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data +// _item}`. +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsService) List(parent string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsDataLabelingJobsListCall) Filter(filter string) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order by default. Use `desc` after a -// field name for descending. -func (c *ProjectsLocationsDataLabelingJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDataLabelingJobsListCall { +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDataLabelingJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDataLabelingJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. FieldMask represents a set of symbolic field paths. For -// example, the mask can be `paths: "name". The "name" here is a field in -// DataLabelingJob. If this field is not set, all fields of the DataLabelingJob -// are returned. -func (c *ProjectsLocationsDataLabelingJobsListCall) ReadMask(readMask string) *ProjectsLocationsDataLabelingJobsListCall { +// fields to read. +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -43117,7 +46788,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) ReadMask(readMask string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43125,27 +46796,27 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDataLabelingJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -43153,7 +46824,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataLabelingJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/annotations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -43166,13 +46837,13 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.list" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDataLabelingJobsResponse.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 +// *GoogleCloudAiplatformV1ListAnnotationsResponse.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 *ProjectsLocationsDataLabelingJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDataLabelingJobsResponse, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListAnnotationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43191,7 +46862,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDataLabelingJobsResponse{ + ret := &GoogleCloudAiplatformV1ListAnnotationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43207,7 +46878,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) Do(opts ...googleapi.CallOpt // 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 *ProjectsLocationsDataLabelingJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDataLabelingJobsResponse) error) error { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListAnnotationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -43225,7 +46896,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) Pages(ctx context.Context, f } } -type ProjectsLocationsDataLabelingJobsOperationsCancelCall struct { +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43244,8 +46915,8 @@ type ProjectsLocationsDataLabelingJobsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) Cancel(name string) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { - c := &ProjectsLocationsDataLabelingJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43253,27 +46924,27 @@ func (r *ProjectsLocationsDataLabelingJobsOperationsService) Cancel(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -43291,13 +46962,13 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.cancel" call. // 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 *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43329,7 +47000,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataLabelingJobsOperationsDeleteCall struct { +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43343,8 +47014,8 @@ type ProjectsLocationsDataLabelingJobsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) Delete(name string) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { - c := &ProjectsLocationsDataLabelingJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Delete(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43352,27 +47023,27 @@ func (r *ProjectsLocationsDataLabelingJobsOperationsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -43390,13 +47061,13 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.delete" call. // 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 *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43428,7 +47099,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataLabelingJobsOperationsGetCall struct { +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43442,8 +47113,8 @@ type ProjectsLocationsDataLabelingJobsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) Get(name string) *ProjectsLocationsDataLabelingJobsOperationsGetCall { - c := &ProjectsLocationsDataLabelingJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Get(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43451,7 +47122,7 @@ func (r *ProjectsLocationsDataLabelingJobsOperationsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43459,27 +47130,27 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Fields(s ...googlea // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -43500,13 +47171,13 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.get" call. // 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 *ProjectsLocationsDataLabelingJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43538,7 +47209,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataLabelingJobsOperationsListCall struct { +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43551,28 +47222,28 @@ type ProjectsLocationsDataLabelingJobsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) List(name string) *ProjectsLocationsDataLabelingJobsOperationsListCall { - c := &ProjectsLocationsDataLabelingJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) List(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Filter(filter string) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -43580,7 +47251,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43588,171 +47259,37 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Fields(s ...google // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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.dataLabelingJobs.operations.list" call. -// 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 *ProjectsLocationsDataLabelingJobsOperationsListCall) 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 -} - -// 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 *ProjectsLocationsDataLabelingJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsDataLabelingJobsOperationsWaitCall 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 *ProjectsLocationsDataLabelingJobsOperationsService) Wait(name string) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { - c := &ProjectsLocationsDataLabelingJobsOperationsWaitCall{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 *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { - 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 -// details. -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -43763,13 +47300,13 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.list" call. // 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 +// *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 *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43788,7 +47325,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43801,59 +47338,90 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDatasetsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Create: Creates a Dataset. +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall 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. // -// - parent: The resource name of the Location to create the Dataset in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDatasetsService) Create(parent string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsCreateCall { - c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Wait(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall{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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -43861,18 +47429,18 @@ func (c *ProjectsLocationsDatasetsCreateCall) 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.datasets.create" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.wait" call. // 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 *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43904,7 +47472,7 @@ func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDatasetsDeleteCall struct { +type ProjectsLocationsDatasetsDataItemsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43912,12 +47480,19 @@ type ProjectsLocationsDatasetsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Dataset. +// 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`. // -// - name: The resource name of the Dataset to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall { - c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43925,34 +47500,34 @@ func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocation // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -43963,13 +47538,13 @@ func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.cancel" call. // 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 *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43988,7 +47563,7 @@ func (c *ProjectsLocationsDatasetsDeleteCall) 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, @@ -44001,61 +47576,57 @@ func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDatasetsExportCall struct { - s *Service - name string - googlecloudaiplatformv1exportdatarequest *GoogleCloudAiplatformV1ExportDataRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDataItemsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Export: Exports data from a Dataset. +// 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 Dataset resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsService) Export(name string, googlecloudaiplatformv1exportdatarequest *GoogleCloudAiplatformV1ExportDataRequest) *ProjectsLocationsDatasetsExportCall { - c := &ProjectsLocationsDatasetsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Delete(name string) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1exportdatarequest = googlecloudaiplatformv1exportdatarequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsExportCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsExportCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsExportCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsExportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportdatarequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -44066,13 +47637,13 @@ func (c *ProjectsLocationsDatasetsExportCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.export" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.delete" call. // 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 *ProjectsLocationsDatasetsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44091,7 +47662,7 @@ func (c *ProjectsLocationsDatasetsExportCall) 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, @@ -44104,7 +47675,7 @@ func (c *ProjectsLocationsDatasetsExportCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDatasetsGetCall struct { +type ProjectsLocationsDatasetsDataItemsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -44113,26 +47684,21 @@ type ProjectsLocationsDatasetsGetCall struct { header_ http.Header } -// Get: Gets a Dataset. +// 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 Dataset resource. -func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall { - c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Get(name string) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsGetCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44140,27 +47706,27 @@ func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *Project // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -44181,13 +47747,13 @@ func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.get" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44206,7 +47772,7 @@ func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Dataset{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44219,61 +47785,87 @@ func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsDatasetsImportCall struct { - s *Service - name string - googlecloudaiplatformv1importdatarequest *GoogleCloudAiplatformV1ImportDataRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDataItemsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Imports data into a Dataset. +// 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 Dataset resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsService) Import(name string, googlecloudaiplatformv1importdatarequest *GoogleCloudAiplatformV1ImportDataRequest) *ProjectsLocationsDatasetsImportCall { - c := &ProjectsLocationsDatasetsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) List(name string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1importdatarequest = googlecloudaiplatformv1importdatarequest + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + 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 // details. -func (c *ProjectsLocationsDatasetsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsImportCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsImportCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsImportCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importdatarequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -44284,13 +47876,13 @@ func (c *ProjectsLocationsDatasetsImportCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.import" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.list" call. // 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 +// *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 *ProjectsLocationsDatasetsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44309,7 +47901,7 @@ func (c *ProjectsLocationsDatasetsImportCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44322,126 +47914,109 @@ func (c *ProjectsLocationsDatasetsImportCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDatasetsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Datasets in a Location. -// -// - parent: The name of the Dataset's parent resource. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall { - c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `display_name`: supports = and != * `metadata_schema_uri`: -// supports = and != * `labels` supports general map functions that is: * -// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key -// existence * A key including a space must be quoted. `labels."a key". Some -// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" -func (c *ProjectsLocationsDatasetsListCall) Filter(filter string) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `display_name` * `create_time` * -// `update_time` -func (c *ProjectsLocationsDatasetsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// 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 *ProjectsLocationsDatasetsDataItemsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsDatasetsDataItemsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *ProjectsLocationsDatasetsDataItemsOperationsService) Wait(name string) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("readMask", readMask) +// 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 *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/datasets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.list" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDatasetsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44460,7 +48035,7 @@ func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDatasetsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44473,107 +48048,78 @@ func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -// 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 *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsDatasetsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDatasetVersionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Dataset. +// Create: Create a version from a Dataset. // -// - name: Output only. Identifier. The resource name of the Dataset. -func (r *ProjectsLocationsDatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsPatchCall { - c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Updatable fields: * `display_name` * -// `description` * `labels` -func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { + c := &ProjectsLocationsDatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.patch" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44592,7 +48138,7 @@ func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Dataset{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44605,197 +48151,73 @@ func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsDatasetsSearchDataItemsCall struct { - s *Service - dataset string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDatasetVersionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchDataItems: Searches DataItems in a Dataset. +// Delete: Deletes a Dataset version. // -// - dataset: The resource name of the Dataset from which to search DataItems. -// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsService) SearchDataItems(dataset string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c := &ProjectsLocationsDatasetsSearchDataItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataset = dataset - return c -} - -// AnnotationFilters sets the optional parameter "annotationFilters": An -// expression that specifies what Annotations will be returned per DataItem. -// Annotations satisfied either of the conditions will be returned. * -// `annotation_spec_id` - for = or !=. Must specify `saved_query_id=` - saved -// query id that annotations should belong to. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationFilters(annotationFilters ...string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.SetMulti("annotationFilters", append([]string{}, annotationFilters...)) - return c -} - -// AnnotationsFilter sets the optional parameter "annotationsFilter": An -// expression for filtering the Annotations that will be returned per DataItem. -// * `annotation_spec_id` - for = or !=. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationsFilter(annotationsFilter string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("annotationsFilter", annotationsFilter) - return c -} - -// AnnotationsLimit sets the optional parameter "annotationsLimit": If set, -// only up to this many of Annotations will be returned per DataItemView. The -// maximum value is 1000. If not set, the maximum value will be used. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationsLimit(annotationsLimit int64) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("annotationsLimit", fmt.Sprint(annotationsLimit)) - return c -} - -// DataItemFilter sets the optional parameter "dataItemFilter": An expression -// for filtering the DataItem that will be returned. * `data_item_id` - for = -// or !=. * `labeled` - for = or !=. * `has_annotation(ANNOTATION_SPEC_ID)` - -// true only for DataItem that have at least one annotation with -// annotation_spec_id = `ANNOTATION_SPEC_ID` in the context of SavedQuery or -// DataLabelingJob. For example: * `data_item=1` * `has_annotation(5)` -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) DataItemFilter(dataItemFilter string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("dataItemFilter", dataItemFilter) - return c -} - -// DataLabelingJob sets the optional parameter "dataLabelingJob": The resource -// name of a DataLabelingJob. Format: -// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} -// ` If this field is set, all of the search will be done in the context of -// this DataLabelingJob. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) DataLabelingJob(dataLabelingJob string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("dataLabelingJob", dataLabelingJob) - return c -} - -// FieldMask sets the optional parameter "fieldMask": Mask specifying which -// fields of DataItemView to read. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) FieldMask(fieldMask string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("fieldMask", fieldMask) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// OrderByAnnotationOrderBy sets the optional parameter -// "orderByAnnotation.orderBy": A comma-separated list of annotation fields to -// order by, sorted in ascending order. Use "desc" after a field name for -// descending. Must also specify saved_query. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByAnnotationOrderBy(orderByAnnotationOrderBy string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("orderByAnnotation.orderBy", orderByAnnotationOrderBy) - return c -} - -// OrderByAnnotationSavedQuery sets the optional parameter -// "orderByAnnotation.savedQuery": Required. Saved query of the Annotation. -// Only Annotations belong to this saved query will be considered for ordering. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByAnnotationSavedQuery(orderByAnnotationSavedQuery string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("orderByAnnotation.savedQuery", orderByAnnotationSavedQuery) - return c -} - -// OrderByDataItem sets the optional parameter "orderByDataItem": A -// comma-separated list of data item fields to order by, sorted in ascending -// order. Use "desc" after a field name for descending. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByDataItem(orderByDataItem string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("orderByDataItem", orderByDataItem) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer results than requested. Default and maximum page size is -// 100. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token identifying a -// page of results for the server to return Typically obtained via -// SearchDataItemsResponse.next_page_token of the previous -// DatasetService.SearchDataItems call. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// SavedQuery sets the optional parameter "savedQuery": The resource name of a -// SavedQuery(annotation set in UI). Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{sav -// ed_query}` All of the search will be done in the context of this SavedQuery. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) SavedQuery(savedQuery string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("savedQuery", savedQuery) +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Delete(name string) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { + c := &ProjectsLocationsDatasetsDatasetVersionsDeleteCall{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 // details. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSearchDataItemsCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSearchDataItemsCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+dataset}:searchDataItems") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataset": c.dataset, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.searchDataItems" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchDataItemsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsSearchDataItemsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchDataItemsResponse, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44814,7 +48236,7 @@ func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchDataItemsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44827,28 +48249,7 @@ func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Do(opts ...googleapi.Call return ret, nil } -// 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 *ProjectsLocationsDatasetsSearchDataItemsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchDataItemsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsDatasetsAnnotationSpecsGetCall struct { +type ProjectsLocationsDatasetsDatasetVersionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -44857,20 +48258,20 @@ type ProjectsLocationsDatasetsAnnotationSpecsGetCall struct { header_ http.Header } -// Get: Gets an AnnotationSpec. +// Get: Gets a Dataset version. // -// - name: The name of the AnnotationSpec resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs -// /{annotation_spec}`. -func (r *ProjectsLocationsDatasetsAnnotationSpecsService) Get(name string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Get(name string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { + c := &ProjectsLocationsDatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // ReadMask sets the optional parameter "readMask": Mask specifying which // fields to read. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { c.urlParams_.Set("readMask", readMask) return c } @@ -44878,7 +48279,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) ReadMask(readMask stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44886,27 +48287,27 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -44927,13 +48328,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.get" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AnnotationSpec.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1DatasetVersion.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 *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AnnotationSpec, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44952,7 +48353,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1AnnotationSpec{ + ret := &GoogleCloudAiplatformV1DatasetVersion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44965,79 +48366,119 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDatasetVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + 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`. +// List: Lists DatasetVersions in a Dataset. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Dataset to list DatasetVersions from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) List(parent string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c := &ProjectsLocationsDatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Filter(filter string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.list" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.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 *ProjectsLocationsDatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45056,7 +48497,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45069,57 +48510,89 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Do(opts . return ret, nil } -type ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsDatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// 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`. +type ProjectsLocationsDatasetsDatasetVersionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DatasetVersion. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Delete(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Identifier. The resource name of the DatasetVersion. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { + c := &ProjectsLocationsDatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -45130,13 +48603,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.patch" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1DatasetVersion.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 *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45155,7 +48628,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1DatasetVersion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45168,7 +48641,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Do(opts . return ret, nil } -type ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall struct { +type ProjectsLocationsDatasetsDatasetVersionsRestoreCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -45177,13 +48650,13 @@ type ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall struct { 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. +// Restore: Restores a dataset version. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Get(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DatasetVersion resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Restore(name string) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { + c := &ProjectsLocationsDatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -45191,7 +48664,7 @@ func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Get(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45199,27 +48672,27 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Fields(s ... // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -45227,7 +48700,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45240,13 +48713,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.restore" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45267,98 +48740,73 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Do(opts ...g } 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 -} - -type ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) List(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsDatasetsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsOperationsCancelCall { + c := &ProjectsLocationsDatasetsOperationsCancelCall{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 // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { +func (c *ProjectsLocationsDatasetsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { +func (c *ProjectsLocationsDatasetsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -45369,13 +48817,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.list" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.cancel" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *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 *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45394,7 +48842,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45407,28 +48855,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Do(opts ... return ret, nil } -// 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall struct { +type ProjectsLocationsDatasetsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -45436,63 +48863,49 @@ type ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall struct { 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. +// 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 wait on. -func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Wait(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsDatasetsOperationsService) Delete(name string) *ProjectsLocationsDatasetsOperationsDeleteCall { + c := &ProjectsLocationsDatasetsOperationsDeleteCall{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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { - 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 // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -45503,13 +48916,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.delete" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDatasetsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45528,7 +48941,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Do(opts ... 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, @@ -45541,64 +48954,30 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Do(opts ... return ret, nil } -type ProjectsLocationsDatasetsDataItemsListCall struct { +type ProjectsLocationsDatasetsOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists DataItems in a Dataset. +// 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. // -// - parent: The resource name of the Dataset to list DataItems from. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsDataItemsService) List(parent string) *ProjectsLocationsDatasetsDataItemsListCall { - c := &ProjectsLocationsDatasetsDataItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. -func (c *ProjectsLocationsDatasetsDataItemsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsDataItemsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsDataItemsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsDataItemsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the operation resource. +func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall { + c := &ProjectsLocationsDatasetsOperationsGetCall{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 // details. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsListCall { +func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45606,27 +48985,27 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) Fields(s ...googleapi.Field // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDataItemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsListCall { +func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsListCall { +func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -45634,7 +49013,7 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataItems") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45642,18 +49021,18 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) doRequest(alt string) (*htt } 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.datasets.dataItems.list" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDataItemsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsDataItemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDataItemsResponse, error) { +func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45672,7 +49051,7 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDataItemsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45685,89 +49064,49 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) Do(opts ...googleapi.CallOp return ret, nil } -// 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 *ProjectsLocationsDatasetsDataItemsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDataItemsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsDatasetsDataItemsAnnotationsListCall struct { +type ProjectsLocationsDatasetsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Annotations belongs to a dataitem This RPC is only available in -// InternalDatasetService. It is only used for exporting conversation data to -// CCAI Insights. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the DataItem to list Annotations from. -// Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data -// _item}`. -func (r *ProjectsLocationsDatasetsDataItemsAnnotationsService) List(parent string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall { + c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45775,27 +49114,27 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Fields(s ...goog // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -45803,7 +49142,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/annotations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45811,18 +49150,18 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) doRequest(alt st } 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.datasets.dataItems.annotations.list" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListAnnotationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListAnnotationsResponse, error) { +func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45841,7 +49180,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListAnnotationsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45857,7 +49196,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Do(opts ...googl // 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 *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListAnnotationsResponse) error) error { +func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -45875,7 +49214,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Pages(ctx contex } } -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall struct { +type ProjectsLocationsDatasetsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -45883,52 +49222,61 @@ type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDatasetsOperationsService) Wait(name string) *ProjectsLocationsDatasetsOperationsWaitCall { + c := &ProjectsLocationsDatasetsOperationsWaitCall{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 *ProjectsLocationsDatasetsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -45941,13 +49289,13 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.wait" call. // 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsDatasetsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45966,7 +49314,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Do(o 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, @@ -45979,7 +49327,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Do(o return ret, nil } -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall struct { +type ProjectsLocationsDatasetsSavedQueriesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -45987,14 +49335,13 @@ type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall struct { 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`. +// Delete: Deletes a SavedQuery. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Delete(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the SavedQuery to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{s +// aved_query}`. +func (r *ProjectsLocationsDatasetsSavedQueriesService) Delete(name string) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { + c := &ProjectsLocationsDatasetsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46002,27 +49349,27 @@ func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Delete( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -46040,123 +49387,13 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.delete" call. -// 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) 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 -} - -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Get(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall{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 -// details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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.datasets.dataItems.annotations.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.delete" call. // 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46188,49 +49425,64 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall struct { +type ProjectsLocationsDatasetsSavedQueriesListCall struct { s *Service - name string + parent 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`. +// List: Lists SavedQueries in a Dataset. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) List(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Dataset to list SavedQueries from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsSavedQueriesService) List(parent string) *ProjectsLocationsDatasetsSavedQueriesListCall { + c := &ProjectsLocationsDatasetsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Filter(filter string) *ProjectsLocationsDatasetsSavedQueriesListCall { c.urlParams_.Set("filter", filter) return c } +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsSavedQueriesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSavedQueriesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSavedQueriesListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsSavedQueriesListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46238,27 +49490,27 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Fields // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -46266,7 +49518,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) doRequ var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/savedQueries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -46274,18 +49526,18 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.list" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.list" call. // 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 +// *GoogleCloudAiplatformV1ListSavedQueriesResponse.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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListSavedQueriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46304,7 +49556,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListSavedQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46320,7 +49572,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Do(opt // 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListSavedQueriesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -46338,120 +49590,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Pages( } } -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Wait(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall{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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { - 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 -// details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.datasets.dataItems.annotations.operations.wait" call. -// 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) 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 -} - -type ProjectsLocationsDatasetsDataItemsOperationsCancelCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46470,8 +49609,8 @@ type ProjectsLocationsDatasetsDataItemsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Cancel(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46479,27 +49618,27 @@ func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Cancel(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -46517,13 +49656,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.cancel" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46555,7 +49694,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDatasetsDataItemsOperationsDeleteCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46569,8 +49708,8 @@ type ProjectsLocationsDatasetsDataItemsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Delete(name string) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Delete(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46578,27 +49717,27 @@ func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Delete(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -46616,13 +49755,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.delete" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46654,7 +49793,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDatasetsDataItemsOperationsGetCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46668,8 +49807,8 @@ type ProjectsLocationsDatasetsDataItemsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Get(name string) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Get(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46677,7 +49816,7 @@ func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46685,27 +49824,27 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Fields(s ...google // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -46726,13 +49865,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.get" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46764,7 +49903,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDatasetsDataItemsOperationsListCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46777,28 +49916,28 @@ type ProjectsLocationsDatasetsDataItemsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) List(name string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) List(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -46806,7 +49945,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageToken(pageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46814,27 +49953,27 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Fields(s ...googl // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -46855,13 +49994,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.list" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.list" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46896,7 +50035,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Do(opts ...google // 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 *ProjectsLocationsDatasetsDataItemsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -46914,7 +50053,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Pages(ctx context } } -type ProjectsLocationsDatasetsDataItemsOperationsWaitCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46933,8 +50072,8 @@ type ProjectsLocationsDatasetsDataItemsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Wait(name string) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Wait(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46943,7 +50082,7 @@ func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Wait(name string) // 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 *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -46951,27 +50090,27 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Timeout(timeout s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -46989,13 +50128,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.wait" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.wait" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47027,59 +50166,59 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeploymentResourcePoolsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1createdeploymentresourcepoolrequest *GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a version from a Dataset. +// Create: Create a DeploymentResourcePool. // -// - parent: The name of the Dataset resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { - c := &ProjectsLocationsDatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent location resource where this DeploymentResourcePool +// will be created. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Create(parent string, googlecloudaiplatformv1createdeploymentresourcepoolrequest *GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest) *ProjectsLocationsDeploymentResourcePoolsCreateCall { + c := &ProjectsLocationsDeploymentResourcePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + c.googlecloudaiplatformv1createdeploymentresourcepoolrequest = googlecloudaiplatformv1createdeploymentresourcepoolrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1createdeploymentresourcepoolrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deploymentResourcePools") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -47092,13 +50231,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.create" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.create" call. // 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 *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47130,7 +50269,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsDeleteCall struct { +type ProjectsLocationsDeploymentResourcePoolsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47138,13 +50277,13 @@ type ProjectsLocationsDatasetsDatasetVersionsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Dataset version. +// Delete: Delete a DeploymentResourcePool. // -// - name: The resource name of the Dataset version to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Delete(name string) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { - c := &ProjectsLocationsDatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DeploymentResourcePool to delete. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Delete(name string) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { + c := &ProjectsLocationsDeploymentResourcePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -47152,27 +50291,27 @@ func (r *ProjectsLocationsDatasetsDatasetVersionsService) Delete(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -47190,13 +50329,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.delete" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.delete" call. // 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 *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47228,7 +50367,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsGetCall struct { +type ProjectsLocationsDeploymentResourcePoolsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47237,28 +50376,21 @@ type ProjectsLocationsDatasetsDatasetVersionsGetCall struct { header_ http.Header } -// Get: Gets a Dataset version. +// Get: Get a DeploymentResourcePool. // -// - name: The resource name of the Dataset version to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Get(name string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { - c := &ProjectsLocationsDatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DeploymentResourcePool to retrieve. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Get(name string) *ProjectsLocationsDeploymentResourcePoolsGetCall { + c := &ProjectsLocationsDeploymentResourcePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47266,27 +50398,27 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -47307,13 +50439,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.get" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1DeploymentResourcePool.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 *ProjectsLocationsDatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DeploymentResourcePool, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47332,7 +50464,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DatasetVersion{ + ret := &GoogleCloudAiplatformV1DeploymentResourcePool{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47345,7 +50477,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsListCall struct { +type ProjectsLocationsDeploymentResourcePoolsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -47354,55 +50486,38 @@ type ProjectsLocationsDatasetsDatasetVersionsListCall struct { header_ http.Header } -// List: Lists DatasetVersions in a Dataset. +// List: List DeploymentResourcePools in a location. // -// - parent: The resource name of the Dataset to list DatasetVersions from. -// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) List(parent string) *ProjectsLocationsDatasetsDatasetVersionsListCall { - c := &ProjectsLocationsDatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent Location which owns this collection of +// DeploymentResourcePools. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) List(parent string) *ProjectsLocationsDeploymentResourcePoolsListCall { + c := &ProjectsLocationsDeploymentResourcePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Filter(filter string) *ProjectsLocationsDatasetsDatasetVersionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDatasetVersionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDatasetVersionsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// DeploymentResourcePools to return. The service may return fewer than this +// value. +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListDeploymentResourcePools` call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided to +// `ListDeploymentResourcePools` must match the call that provided the page // token. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDatasetVersionsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47410,27 +50525,27 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -47438,7 +50553,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deploymentResourcePools") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -47451,13 +50566,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.list" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.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 *ProjectsLocationsDatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, error) { +// *GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse.ServerResponse.He +// ader 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 *ProjectsLocationsDeploymentResourcePoolsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47476,7 +50591,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ + ret := &GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47492,7 +50607,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsDatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -47510,29 +50625,30 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Pages(ctx context.Con } } -type ProjectsLocationsDatasetsDatasetVersionsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeploymentResourcePoolsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DatasetVersion. +// Patch: Update a DeploymentResourcePool. // -// - name: Output only. Identifier. The resource name of the DatasetVersion. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { - c := &ProjectsLocationsDatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The resource name of the DeploymentResourcePool. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Patch(name string, googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c := &ProjectsLocationsDeploymentResourcePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + c.googlecloudaiplatformv1deploymentresourcepool = googlecloudaiplatformv1deploymentresourcepool return c } -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Updatable fields: * `display_name` -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { +// UpdateMask sets the optional parameter "updateMask": Required. The list of +// fields to update. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentResourcePoolsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -47540,30 +50656,30 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) UpdateMask(updateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymentresourcepool) if err != nil { return nil, err } @@ -47582,13 +50698,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.patch" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47607,7 +50723,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DatasetVersion{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47620,30 +50736,48 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsRestoreCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall struct { + s *Service + deploymentResourcePool string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Restore: Restores a dataset version. +// QueryDeployedModels: List DeployedModels that have been deployed on this +// DeploymentResourcePool. // -// - name: The name of the DatasetVersion resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Restore(name string) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { - c := &ProjectsLocationsDatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - deploymentResourcePool: The name of the target DeploymentResourcePool to +// query. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) QueryDeployedModels(deploymentResourcePool string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { + c := &ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.deploymentResourcePool = deploymentResourcePool + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// DeployedModels to return. The service may return fewer than this value. +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `QueryDeployedModels` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `QueryDeployedModels` must match the call that provided the page token. +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { + 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 // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47651,27 +50785,27 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Fields(s ...google // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -47679,7 +50813,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+deploymentResourcePool}:queryDeployedModels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -47687,18 +50821,18 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "deploymentResourcePool": c.deploymentResourcePool, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.restore" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.queryDeployedModels" call. // 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 +// *GoogleCloudAiplatformV1QueryDeployedModelsResponse.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 *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1QueryDeployedModelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47717,7 +50851,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1QueryDeployedModelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47730,7 +50864,28 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDatasetsOperationsCancelCall struct { +// 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 *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1QueryDeployedModelsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47749,8 +50904,8 @@ type ProjectsLocationsDatasetsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsOperationsCancelCall { - c := &ProjectsLocationsDatasetsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Cancel(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -47758,27 +50913,27 @@ func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsCancelCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsCancelCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -47796,13 +50951,13 @@ func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.cancel" call. // 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 *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47834,7 +50989,7 @@ func (c *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDatasetsOperationsDeleteCall struct { +type ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47848,8 +51003,8 @@ type ProjectsLocationsDatasetsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsOperationsService) Delete(name string) *ProjectsLocationsDatasetsOperationsDeleteCall { - c := &ProjectsLocationsDatasetsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Delete(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -47857,27 +51012,27 @@ func (r *ProjectsLocationsDatasetsOperationsService) Delete(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsDeleteCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsDeleteCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -47895,13 +51050,13 @@ func (c *ProjectsLocationsDatasetsOperationsDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.delete" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.delete" call. // 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 *ProjectsLocationsDatasetsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47933,7 +51088,7 @@ func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDatasetsOperationsGetCall struct { +type ProjectsLocationsDeploymentResourcePoolsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47947,8 +51102,8 @@ type ProjectsLocationsDatasetsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall { - c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Get(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -47956,7 +51111,7 @@ func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47964,27 +51119,27 @@ func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -48005,13 +51160,13 @@ func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.get" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.get" call. // 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 *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48043,7 +51198,7 @@ func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDatasetsOperationsListCall struct { +type ProjectsLocationsDeploymentResourcePoolsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -48056,28 +51211,28 @@ type ProjectsLocationsDatasetsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall { - c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) List(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Filter(filter string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -48085,7 +51240,7 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -48093,27 +51248,27 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -48134,13 +51289,13 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.list" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.list" call. // 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 *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48175,7 +51330,7 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) 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 *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -48193,7 +51348,7 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, } } -type ProjectsLocationsDatasetsOperationsWaitCall struct { +type ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -48212,8 +51367,8 @@ type ProjectsLocationsDatasetsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDatasetsOperationsService) Wait(name string) *ProjectsLocationsDatasetsOperationsWaitCall { - c := &ProjectsLocationsDatasetsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Wait(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -48222,7 +51377,7 @@ func (r *ProjectsLocationsDatasetsOperationsService) Wait(name string) *Projects // 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 *ProjectsLocationsDatasetsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsOperationsWaitCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -48230,27 +51385,27 @@ func (c *ProjectsLocationsDatasetsOperationsWaitCall) Timeout(timeout string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsWaitCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsWaitCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -48268,13 +51423,13 @@ func (c *ProjectsLocationsDatasetsOperationsWaitCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.wait" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.wait" call. // 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 *ProjectsLocationsDatasetsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48306,73 +51461,78 @@ func (c *ProjectsLocationsDatasetsOperationsWaitCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a SavedQuery. +// ComputeTokens: Return a list of tokens based on the input text. // -// - name: The resource name of the SavedQuery to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{s -// aved_query}`. -func (r *ProjectsLocationsDatasetsSavedQueriesService) Delete(name string) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { - c := &ProjectsLocationsDatasetsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *ProjectsLocationsEndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsEndpointsComputeTokensCall { + c := &ProjectsLocationsEndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { +func (c *ProjectsLocationsEndpointsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsComputeTokensCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { +func (c *ProjectsLocationsEndpointsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsComputeTokensCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsComputeTokensCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.computeTokens" call. // 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 +// *GoogleCloudAiplatformV1ComputeTokensResponse.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 *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48391,7 +51551,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48404,102 +51564,179 @@ func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists SavedQueries in a Dataset. +// CountTokens: Perform a token counting. // -// - parent: The resource name of the Dataset to list SavedQueries from. -// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsSavedQueriesService) List(parent string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c := &ProjectsLocationsDatasetsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsEndpointsCountTokensCall { + c := &ProjectsLocationsEndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Filter(filter string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEndpointsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("orderBy", orderBy) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEndpointsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCountTokensCall { + c.ctx_ = ctx return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("pageToken", pageToken) +func (c *ProjectsLocationsEndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.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 *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, 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 := &GoogleCloudAiplatformV1CountTokensResponse{ + 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 +} + +type ProjectsLocationsEndpointsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an Endpoint. +// +// - parent: The resource name of the Location to create the Endpoint in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsEndpointsService) Create(parent string, googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint) *ProjectsLocationsEndpointsCreateCall { + c := &ProjectsLocationsEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1endpoint = googlecloudaiplatformv1endpoint return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("readMask", readMask) +// EndpointId sets the optional parameter "endpointId": Immutable. The ID to +// use for endpoint, which will become the final component of the endpoint +// resource name. If not provided, Vertex AI will generate a value for this ID. +// If the first character is a letter, this value may be up to 63 characters, +// and valid characters are `[a-z0-9-]`. The last character must be a letter or +// number. If the first character is a number, this value may be up to 9 +// characters, and valid characters are `[0-9]` with no leading zeros. When +// using HTTP/JSON, this field is populated based on a query string argument, +// such as `?endpoint_id=12345`. This is the fallback for fields that are not +// included in either the URI or the body. +func (c *ProjectsLocationsEndpointsCreateCall) EndpointId(endpointId string) *ProjectsLocationsEndpointsCreateCall { + c.urlParams_.Set("endpointId", endpointId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesListCall { +func (c *ProjectsLocationsEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesListCall { +func (c *ProjectsLocationsEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1endpoint) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/savedQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -48510,13 +51747,13 @@ func (c *ProjectsLocationsDatasetsSavedQueriesListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.list" call. +// Do executes the "aiplatform.projects.locations.endpoints.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListSavedQueriesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListSavedQueriesResponse, error) { +func (c *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48535,7 +51772,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListSavedQueriesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48548,28 +51785,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Do(opts ...googleapi.Cal return ret, nil } -// 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 *ProjectsLocationsDatasetsSavedQueriesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListSavedQueriesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall struct { +type ProjectsLocationsEndpointsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -48577,19 +51793,12 @@ type ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall 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`. +// Delete: Deletes an Endpoint. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Cancel(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Endpoint resource to be deleted. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Delete(name string) *ProjectsLocationsEndpointsDeleteCall { + c := &ProjectsLocationsEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -48597,34 +51806,34 @@ func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Cancel(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { +func (c *ProjectsLocationsEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { +func (c *ProjectsLocationsEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -48635,13 +51844,13 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.endpoints.delete" call. // 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 *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48660,7 +51869,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Do(opts ...g 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, @@ -48673,74 +51882,79 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsDeployModelCall struct { + s *Service + endpoint string + googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest + 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`. +// DeployModel: Deploys a Model into this Endpoint, creating a DeployedModel +// within it. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Delete(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint resource into which to deploy a Model. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DeployModel(endpoint string, googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest) *ProjectsLocationsEndpointsDeployModelCall { + c := &ProjectsLocationsEndpointsDeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1deploymodelrequest = googlecloudaiplatformv1deploymodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { +func (c *ProjectsLocationsEndpointsDeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeployModelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { +func (c *ProjectsLocationsEndpointsDeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeployModelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDeployModelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsDeployModelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymodelrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:deployModel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.deployModel" call. // 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 *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48759,7 +51973,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Do(opts ...g 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, @@ -48772,85 +51986,79 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsDirectPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest + urlParams_ gensupport.URLParams + 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. +// DirectPredict: Perform an unary online prediction request to a gRPC model +// server for Vertex first-party products and frameworks. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Get(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DirectPredict(endpoint string, googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest) *ProjectsLocationsEndpointsDirectPredictCall { + c := &ProjectsLocationsEndpointsDirectPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1directpredictrequest = googlecloudaiplatformv1directpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsDirectPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:directPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.get" call. +// Do executes the "aiplatform.projects.locations.endpoints.directPredict" call. // 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 +// *GoogleCloudAiplatformV1DirectPredictResponse.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 *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48869,7 +52077,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1DirectPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48882,104 +52090,79 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsDirectRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest + urlParams_ gensupport.URLParams + 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`. +// DirectRawPredict: Perform an unary online prediction request to a gRPC model +// server for custom containers. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) List(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DirectRawPredict(endpoint string, googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest) *ProjectsLocationsEndpointsDirectRawPredictCall { + c := &ProjectsLocationsEndpointsDirectRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1directrawpredictrequest = googlecloudaiplatformv1directrawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directrawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:directRawPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.list" call. +// Do executes the "aiplatform.projects.locations.endpoints.directRawPredict" call. // 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 +// *GoogleCloudAiplatformV1DirectRawPredictResponse.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 *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectRawPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48998,7 +52181,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1DirectRawPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49011,90 +52194,62 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Do(opts ...goo return ret, nil } -// 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 *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsExplainCall struct { + s *Service + endpoint string + googlecloudaiplatformv1explainrequest *GoogleCloudAiplatformV1ExplainRequest + 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. +// Explain: Perform an online explanation. If deployed_model_id is specified, +// the corresponding DeployModel must have explanation_spec populated. If +// deployed_model_id is not specified, all DeployedModels must have +// explanation_spec populated. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Wait(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall{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 *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - endpoint: The name of the Endpoint requested to serve the explanation. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Explain(endpoint string, googlecloudaiplatformv1explainrequest *GoogleCloudAiplatformV1ExplainRequest) *ProjectsLocationsEndpointsExplainCall { + c := &ProjectsLocationsEndpointsExplainCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1explainrequest = googlecloudaiplatformv1explainrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { +func (c *ProjectsLocationsEndpointsExplainCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsExplainCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { +func (c *ProjectsLocationsEndpointsExplainCall) Context(ctx context.Context) *ProjectsLocationsEndpointsExplainCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsExplainCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsExplainCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1explainrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:explain") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -49102,18 +52257,18 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.wait" call. +// Do executes the "aiplatform.projects.locations.endpoints.explain" call. // 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 +// *GoogleCloudAiplatformV1ExplainResponse.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 *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsExplainCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ExplainResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49132,7 +52287,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ExplainResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49145,59 +52300,61 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1createdeploymentresourcepoolrequest *GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsFetchPredictOperationCall struct { + s *Service + endpoint string + googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a DeploymentResourcePool. +// FetchPredictOperation: Fetch an asynchronous online prediction operation. // -// - parent: The parent location resource where this DeploymentResourcePool -// will be created. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) Create(parent string, googlecloudaiplatformv1createdeploymentresourcepoolrequest *GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest) *ProjectsLocationsDeploymentResourcePoolsCreateCall { - c := &ProjectsLocationsDeploymentResourcePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1createdeploymentresourcepoolrequest = googlecloudaiplatformv1createdeploymentresourcepoolrequest +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or +// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod +// el}`. +func (r *ProjectsLocationsEndpointsService) FetchPredictOperation(endpoint string, googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest) *ProjectsLocationsEndpointsFetchPredictOperationCall { + c := &ProjectsLocationsEndpointsFetchPredictOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1fetchpredictoperationrequest = googlecloudaiplatformv1fetchpredictoperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsCreateCall { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsFetchPredictOperationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsCreateCall { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Context(ctx context.Context) *ProjectsLocationsEndpointsFetchPredictOperationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1createdeploymentresourcepoolrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchpredictoperationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deploymentResourcePools") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:fetchPredictOperation") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -49205,18 +52362,18 @@ func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) doRequest(alt strin } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.create" call. +// Do executes the "aiplatform.projects.locations.endpoints.fetchPredictOperation" call. // 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 *ProjectsLocationsDeploymentResourcePoolsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49248,73 +52405,81 @@ func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete a DeploymentResourcePool. -// -// - name: The name of the DeploymentResourcePool to delete. Format: -// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen -// t_resource_pool}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) Delete(name string) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { - c := &ProjectsLocationsDeploymentResourcePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsGenerateContentCall { + c := &ProjectsLocationsEndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { +func (c *ProjectsLocationsEndpointsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGenerateContentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { +func (c *ProjectsLocationsEndpointsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGenerateContentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsGenerateContentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.generateContent" call. // 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 +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49333,7 +52498,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49346,7 +52511,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsGetCall struct { +type ProjectsLocationsEndpointsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -49355,13 +52520,12 @@ type ProjectsLocationsDeploymentResourcePoolsGetCall struct { header_ http.Header } -// Get: Get a DeploymentResourcePool. +// Get: Gets an Endpoint. // -// - name: The name of the DeploymentResourcePool to retrieve. Format: -// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen -// t_resource_pool}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) Get(name string) *ProjectsLocationsDeploymentResourcePoolsGetCall { - c := &ProjectsLocationsDeploymentResourcePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Endpoint resource. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Get(name string) *ProjectsLocationsEndpointsGetCall { + c := &ProjectsLocationsEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -49369,7 +52533,7 @@ func (r *ProjectsLocationsDeploymentResourcePoolsService) Get(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsGetCall { +func (c *ProjectsLocationsEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -49377,27 +52541,27 @@ func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsGetCall { +func (c *ProjectsLocationsEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsGetCall { +func (c *ProjectsLocationsEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -49418,13 +52582,13 @@ func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.get" call. +// Do executes the "aiplatform.projects.locations.endpoints.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DeploymentResourcePool.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Endpoint.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 *ProjectsLocationsDeploymentResourcePoolsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DeploymentResourcePool, error) { +func (c *ProjectsLocationsEndpointsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Endpoint, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49443,7 +52607,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DeploymentResourcePool{ + ret := &GoogleCloudAiplatformV1Endpoint{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49456,7 +52620,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsListCall struct { +type ProjectsLocationsEndpointsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -49465,38 +52629,66 @@ type ProjectsLocationsDeploymentResourcePoolsListCall struct { header_ http.Header } -// List: List DeploymentResourcePools in a location. +// List: Lists Endpoints in a Location. // -// - parent: The parent Location which owns this collection of -// DeploymentResourcePools. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) List(parent string) *ProjectsLocationsDeploymentResourcePoolsListCall { - c := &ProjectsLocationsDeploymentResourcePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location from which to list the +// Endpoints. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsEndpointsService) List(parent string) *ProjectsLocationsEndpointsListCall { + c := &ProjectsLocationsEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// DeploymentResourcePools to return. The service may return fewer than this -// value. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `endpoint` supports `=` and `!=`. `endpoint` represents the +// Endpoint ID, i.e. the last segment of the Endpoint's resource name. * +// `display_name` supports `=` and `!=`. * `labels` supports general map +// functions that is: * `labels.key=value` - key:value equality * +// `labels.key:*` or `labels:key` - key existence * A key including a space +// must be quoted. `labels."a key". * `base_model_name` only supports `=`. +// Some examples: * `endpoint=1` * `displayName="myDisplayName" * +// `labels.myKey="myValue" * `baseModelName="text-bison" +func (c *ProjectsLocationsEndpointsListCall) Filter(filter string) *ProjectsLocationsEndpointsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsEndpointsListCall) OrderBy(orderBy string) *ProjectsLocationsEndpointsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListDeploymentResourcePools` call. Provide this to retrieve -// the subsequent page. When paginating, all other parameters provided to -// `ListDeploymentResourcePools` must match the call that provided the page -// token. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListEndpointsResponse.next_page_token of the +// previous EndpointService.ListEndpoints call. +func (c *ProjectsLocationsEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsEndpointsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsEndpointsListCall) ReadMask(readMask string) *ProjectsLocationsEndpointsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsListCall { +func (c *ProjectsLocationsEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -49504,27 +52696,27 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsListCall { +func (c *ProjectsLocationsEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsListCall { +func (c *ProjectsLocationsEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsEndpointsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -49532,7 +52724,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deploymentResourcePools") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -49545,13 +52737,13 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.list" call. +// Do executes the "aiplatform.projects.locations.endpoints.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse.ServerResponse.He -// ader 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 *ProjectsLocationsDeploymentResourcePoolsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse, error) { +// *GoogleCloudAiplatformV1ListEndpointsResponse.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 *ProjectsLocationsEndpointsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListEndpointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49570,7 +52762,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse{ + ret := &GoogleCloudAiplatformV1ListEndpointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49586,7 +52778,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsDeploymentResourcePoolsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse) error) error { +func (c *ProjectsLocationsEndpointsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListEndpointsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -49604,86 +52796,82 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Pages(ctx context.Con } } -type ProjectsLocationsDeploymentResourcePoolsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsMutateDeployedModelCall struct { + s *Service + endpoint string + googlecloudaiplatformv1mutatedeployedmodelrequest *GoogleCloudAiplatformV1MutateDeployedModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Update a DeploymentResourcePool. +// MutateDeployedModel: Updates an existing deployed model. Updatable fields +// include `min_replica_count`, `max_replica_count`, +// `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and +// `enable_container_logging` (v1beta1 only). // -// - name: Immutable. The resource name of the DeploymentResourcePool. Format: -// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen -// t_resource_pool}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) Patch(name string, googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool) *ProjectsLocationsDeploymentResourcePoolsPatchCall { - c := &ProjectsLocationsDeploymentResourcePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1deploymentresourcepool = googlecloudaiplatformv1deploymentresourcepool - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentResourcePoolsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - endpoint: The name of the Endpoint resource into which to mutate a +// DeployedModel. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) MutateDeployedModel(endpoint string, googlecloudaiplatformv1mutatedeployedmodelrequest *GoogleCloudAiplatformV1MutateDeployedModelRequest) *ProjectsLocationsEndpointsMutateDeployedModelCall { + c := &ProjectsLocationsEndpointsMutateDeployedModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1mutatedeployedmodelrequest = googlecloudaiplatformv1mutatedeployedmodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsPatchCall { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsMutateDeployedModelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsPatchCall { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsMutateDeployedModelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymentresourcepool) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1mutatedeployedmodelrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:mutateDeployedModel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.patch" call. +// Do executes the "aiplatform.projects.locations.endpoints.mutateDeployedModel" call. // 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 *ProjectsLocationsDeploymentResourcePoolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49715,103 +52903,84 @@ func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall struct { - s *Service - deploymentResourcePool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// QueryDeployedModels: List DeployedModels that have been deployed on this -// DeploymentResourcePool. +// Patch: Updates an Endpoint. // -// - deploymentResourcePool: The name of the target DeploymentResourcePool to -// query. Format: -// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen -// t_resource_pool}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) QueryDeployedModels(deploymentResourcePool string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { - c := &ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.deploymentResourcePool = deploymentResourcePool - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// DeployedModels to return. The service may return fewer than this value. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: Output only. The resource name of the Endpoint. +func (r *ProjectsLocationsEndpointsService) Patch(name string, googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint) *ProjectsLocationsEndpointsPatchCall { + c := &ProjectsLocationsEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1endpoint = googlecloudaiplatformv1endpoint return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `QueryDeployedModels` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `QueryDeployedModels` must match the call that provided the page token. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. See google.protobuf.FieldMask. +func (c *ProjectsLocationsEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { +func (c *ProjectsLocationsEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { +func (c *ProjectsLocationsEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1endpoint) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+deploymentResourcePool}:queryDeployedModels") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "deploymentResourcePool": c.deploymentResourcePool, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.queryDeployedModels" call. +// Do executes the "aiplatform.projects.locations.endpoints.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1QueryDeployedModelsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Endpoint.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 *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1QueryDeployedModelsResponse, error) { +func (c *ProjectsLocationsEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Endpoint, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49830,7 +52999,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1QueryDeployedModelsResponse{ + ret := &GoogleCloudAiplatformV1Endpoint{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49843,81 +53012,164 @@ func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Do(opt return ret, nil } -// 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 *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1QueryDeployedModelsResponse) error) error { +type ProjectsLocationsEndpointsPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Predict: Perform an online prediction. +// +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Predict(endpoint string, googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest) *ProjectsLocationsEndpointsPredictCall { + c := &ProjectsLocationsEndpointsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1predictrequest = googlecloudaiplatformv1predictrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEndpointsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPredictCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEndpointsPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPredictCall { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEndpointsPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predict") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.predict" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1PredictResponse.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 *ProjectsLocationsEndpointsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PredictResponse, 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() } - c.PageToken(x.NextPageToken) + 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 := &GoogleCloudAiplatformV1PredictResponse{ + 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 } -type ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsPredictLongRunningCall struct { + s *Service + endpoint string + googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + 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`. +// PredictLongRunning: // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Cancel(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or +// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod +// el}`. +func (r *ProjectsLocationsEndpointsService) PredictLongRunning(endpoint string, googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest) *ProjectsLocationsEndpointsPredictLongRunningCall { + c := &ProjectsLocationsEndpointsPredictLongRunningCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1predictlongrunningrequest = googlecloudaiplatformv1predictlongrunningrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { +func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPredictLongRunningCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { +func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPredictLongRunningCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsPredictLongRunningCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictlongrunningrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predictLongRunning") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -49925,18 +53177,18 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) doRequest } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.endpoints.predictLongRunning" call. // 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 *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsEndpointsPredictLongRunningCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49955,7 +53207,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Do(opts . 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, @@ -49968,74 +53220,82 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Do(opts . return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest + 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`. +// RawPredict: Perform an online prediction with an arbitrary HTTP payload. The +// response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: +// ID of the Endpoint that served this prediction. * +// `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that +// served this prediction. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Delete(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) RawPredict(endpoint string, googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest) *ProjectsLocationsEndpointsRawPredictCall { + c := &ProjectsLocationsEndpointsRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1rawpredictrequest = googlecloudaiplatformv1rawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { +func (c *ProjectsLocationsEndpointsRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { +func (c *ProjectsLocationsEndpointsRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:rawPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.rawPredict" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// *GoogleApiHttpBody.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 *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsEndpointsRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50054,7 +53314,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50067,85 +53327,79 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Do(opts . return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsServerStreamingPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest + urlParams_ gensupport.URLParams + 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. +// ServerStreamingPredict: Perform a server-side streaming online prediction +// request for Vertex LLM streaming. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Get(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) ServerStreamingPredict(endpoint string, googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest) *ProjectsLocationsEndpointsServerStreamingPredictCall { + c := &ProjectsLocationsEndpointsServerStreamingPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1streamingpredictrequest = googlecloudaiplatformv1streamingpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsServerStreamingPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsServerStreamingPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:serverStreamingPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.get" call. +// Do executes the "aiplatform.projects.locations.endpoints.serverStreamingPredict" call. // 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 +// *GoogleCloudAiplatformV1StreamingPredictResponse.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 *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1StreamingPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50164,7 +53418,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1StreamingPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50177,104 +53431,82 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + 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`. +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) List(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Filter(filter string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { + c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamGenerateContentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamGenerateContentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.list" call. +// Do executes the "aiplatform.projects.locations.endpoints.streamGenerateContent" call. // 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 +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50293,7 +53525,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50306,90 +53538,60 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Do(opts ... return ret, nil } -// 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 *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsStreamRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest + 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. +// StreamRawPredict: Perform a streaming online prediction with an arbitrary +// HTTP payload. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Wait(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall{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 *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest) *ProjectsLocationsEndpointsStreamRawPredictCall { + c := &ProjectsLocationsEndpointsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1streamrawpredictrequest = googlecloudaiplatformv1streamrawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamrawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:streamRawPredict") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50397,18 +53599,18 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) doRequest(a } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.wait" call. +// Do executes the "aiplatform.projects.locations.endpoints.streamRawPredict" call. // 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 *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleApiHttpBody.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 *ProjectsLocationsEndpointsStreamRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50427,7 +53629,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50440,59 +53642,61 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ... return ret, nil } -type ProjectsLocationsEndpointsComputeTokensCall struct { +type ProjectsLocationsEndpointsUndeployModelCall struct { s *Service endpoint string - googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + googlecloudaiplatformv1undeploymodelrequest *GoogleCloudAiplatformV1UndeployModelRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// ComputeTokens: Return a list of tokens based on the input text. +// UndeployModel: Undeploys a Model from an Endpoint, removing a DeployedModel +// from it, and freeing all resources it's using. // -// - endpoint: The name of the Endpoint requested to get lists of tokens and -// token ids. -func (r *ProjectsLocationsEndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsEndpointsComputeTokensCall { - c := &ProjectsLocationsEndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - endpoint: The name of the Endpoint resource from which to undeploy a +// Model. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) UndeployModel(endpoint string, googlecloudaiplatformv1undeploymodelrequest *GoogleCloudAiplatformV1UndeployModelRequest) *ProjectsLocationsEndpointsUndeployModelCall { + c := &ProjectsLocationsEndpointsUndeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.endpoint = endpoint - c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + c.googlecloudaiplatformv1undeploymodelrequest = googlecloudaiplatformv1undeploymodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsComputeTokensCall { +func (c *ProjectsLocationsEndpointsUndeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsUndeployModelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsComputeTokensCall { +func (c *ProjectsLocationsEndpointsUndeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsUndeployModelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsComputeTokensCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsUndeployModelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsUndeployModelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1undeploymodelrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:undeployModel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50505,13 +53709,13 @@ func (c *ProjectsLocationsEndpointsComputeTokensCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.computeTokens" call. +// Do executes the "aiplatform.projects.locations.endpoints.undeployModel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { +func (c *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50530,7 +53734,7 @@ func (c *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50543,59 +53747,58 @@ func (c *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEndpointsCountTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsUpdateCall struct { + s *Service + name string + googlecloudaiplatformv1updateendpointlongrunningrequest *GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CountTokens: Perform a token counting. +// Update: Updates an Endpoint with a long running operation. // -// - endpoint: The name of the Endpoint requested to perform token counting. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsEndpointsCountTokensCall { - c := &ProjectsLocationsEndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest +// - name: Output only. The resource name of the Endpoint. +func (r *ProjectsLocationsEndpointsService) Update(name string, googlecloudaiplatformv1updateendpointlongrunningrequest *GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest) *ProjectsLocationsEndpointsUpdateCall { + c := &ProjectsLocationsEndpointsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1updateendpointlongrunningrequest = googlecloudaiplatformv1updateendpointlongrunningrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCountTokensCall { +func (c *ProjectsLocationsEndpointsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCountTokensCall { +func (c *ProjectsLocationsEndpointsUpdateCall) Context(ctx context.Context) *ProjectsLocationsEndpointsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsCountTokensCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1updateendpointlongrunningrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:update") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50603,18 +53806,18 @@ func (c *ProjectsLocationsEndpointsCountTokensCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.countTokens" call. +// Do executes the "aiplatform.projects.locations.endpoints.update" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { +func (c *ProjectsLocationsEndpointsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50633,7 +53836,7 @@ func (c *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CountTokensResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50646,74 +53849,59 @@ func (c *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsEndpointsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsChatCompletionsCall struct { + s *Service + endpoint string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Endpoint. +// Completions: Exposes an OpenAI-compatible endpoint for chat completions. // -// - parent: The resource name of the Location to create the Endpoint in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsEndpointsService) Create(parent string, googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint) *ProjectsLocationsEndpointsCreateCall { - c := &ProjectsLocationsEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1endpoint = googlecloudaiplatformv1endpoint - return c -} - -// EndpointId sets the optional parameter "endpointId": Immutable. The ID to -// use for endpoint, which will become the final component of the endpoint -// resource name. If not provided, Vertex AI will generate a value for this ID. -// If the first character is a letter, this value may be up to 63 characters, -// and valid characters are `[a-z0-9-]`. The last character must be a letter or -// number. If the first character is a number, this value may be up to 9 -// characters, and valid characters are `[0-9]` with no leading zeros. When -// using HTTP/JSON, this field is populated based on a query string argument, -// such as `?endpoint_id=12345`. This is the fallback for fields that are not -// included in either the URI or the body. -func (c *ProjectsLocationsEndpointsCreateCall) EndpointId(endpointId string) *ProjectsLocationsEndpointsCreateCall { - c.urlParams_.Set("endpointId", endpointId) +// - endpoint: The name of the endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsChatService) Completions(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsChatCompletionsCall { + c := &ProjectsLocationsEndpointsChatCompletionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googleapihttpbody = googleapihttpbody return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCreateCall { +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsChatCompletionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCreateCall { +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointsChatCompletionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsCreateCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsChatCompletionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1endpoint) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}/chat/completions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50721,18 +53909,18 @@ func (c *ProjectsLocationsEndpointsCreateCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.create" call. +// Do executes the "aiplatform.projects.locations.endpoints.chat.completions" call. // 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 *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleApiHttpBody.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 *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50751,7 +53939,7 @@ func (c *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50764,7 +53952,7 @@ func (c *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsDeleteCall struct { +type ProjectsLocationsEndpointsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -50772,12 +53960,19 @@ type ProjectsLocationsEndpointsDeleteCall struct { header_ http.Header } -// Delete: Deletes an Endpoint. +// 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`. // -// - name: The name of the Endpoint resource to be deleted. Format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Delete(name string) *ProjectsLocationsEndpointsDeleteCall { - c := &ProjectsLocationsEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsEndpointsOperationsService) Cancel(name string) *ProjectsLocationsEndpointsOperationsCancelCall { + c := &ProjectsLocationsEndpointsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -50785,34 +53980,34 @@ func (r *ProjectsLocationsEndpointsService) Delete(name string) *ProjectsLocatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeleteCall { +func (c *ProjectsLocationsEndpointsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeleteCall { +func (c *ProjectsLocationsEndpointsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -50823,13 +54018,13 @@ func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.cancel" call. // 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 *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsEndpointsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50848,7 +54043,7 @@ func (c *ProjectsLocationsEndpointsDeleteCall) 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, @@ -50861,79 +54056,74 @@ func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsDeployModelCall struct { - s *Service - endpoint string - googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeployModel: Deploys a Model into this Endpoint, creating a DeployedModel -// within it. +type ProjectsLocationsEndpointsOperationsDeleteCall 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`. // -// - endpoint: The name of the Endpoint resource into which to deploy a Model. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) DeployModel(endpoint string, googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest) *ProjectsLocationsEndpointsDeployModelCall { - c := &ProjectsLocationsEndpointsDeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1deploymodelrequest = googlecloudaiplatformv1deploymodelrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsEndpointsOperationsService) Delete(name string) *ProjectsLocationsEndpointsOperationsDeleteCall { + c := &ProjectsLocationsEndpointsOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsEndpointsDeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeployModelCall { +func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsDeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeployModelCall { +func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsDeployModelCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDeployModelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsEndpointsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymodelrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:deployModel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.deployModel" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.delete" call. // 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 *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsEndpointsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50952,7 +54142,7 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOpt 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, @@ -50965,79 +54155,85 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsEndpointsDirectPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DirectPredict: Perform an unary online prediction request to a gRPC model -// server for Vertex first-party products and frameworks. +// 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. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) DirectPredict(endpoint string, googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest) *ProjectsLocationsEndpointsDirectPredictCall { - c := &ProjectsLocationsEndpointsDirectPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1directpredictrequest = googlecloudaiplatformv1directpredictrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsEndpointsOperationsService) Get(name string) *ProjectsLocationsEndpointsOperationsGetCall { + c := &ProjectsLocationsEndpointsOperationsGetCall{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 // details. -func (c *ProjectsLocationsEndpointsDirectPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectPredictCall { +func (c *ProjectsLocationsEndpointsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsEndpointsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsDirectPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectPredictCall { +func (c *ProjectsLocationsEndpointsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsDirectPredictCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDirectPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directpredictrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEndpointsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+endpoint}:directPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.directPredict" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DirectPredictResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectPredictResponse, error) { +func (c *ProjectsLocationsEndpointsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51056,7 +54252,7 @@ func (c *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DirectPredictResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51069,79 +54265,104 @@ func (c *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEndpointsDirectRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DirectRawPredict: Perform an unary online prediction request to a gRPC model -// server for custom containers. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) DirectRawPredict(endpoint string, googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest) *ProjectsLocationsEndpointsDirectRawPredictCall { - c := &ProjectsLocationsEndpointsDirectRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1directrawpredictrequest = googlecloudaiplatformv1directrawpredictrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsEndpointsOperationsService) List(name string) *ProjectsLocationsEndpointsOperationsListCall { + c := &ProjectsLocationsEndpointsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsEndpointsOperationsListCall) Filter(filter string) *ProjectsLocationsEndpointsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsEndpointsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsEndpointsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsEndpointsOperationsListCall { + 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 // details. -func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectRawPredictCall { +func (c *ProjectsLocationsEndpointsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsEndpointsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectRawPredictCall { +func (c *ProjectsLocationsEndpointsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDirectRawPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directrawpredictrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEndpointsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+endpoint}:directRawPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.directRawPredict" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DirectRawPredictResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectRawPredictResponse, error) { +func (c *ProjectsLocationsEndpointsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51160,7 +54381,7 @@ func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DirectRawPredictResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51173,62 +54394,90 @@ func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEndpointsExplainCall struct { - s *Service - endpoint string - googlecloudaiplatformv1explainrequest *GoogleCloudAiplatformV1ExplainRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsEndpointsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Explain: Perform an online explanation. If deployed_model_id is specified, -// the corresponding DeployModel must have explanation_spec populated. If -// deployed_model_id is not specified, all DeployedModels must have -// explanation_spec populated. +type ProjectsLocationsEndpointsOperationsWaitCall 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. // -// - endpoint: The name of the Endpoint requested to serve the explanation. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Explain(endpoint string, googlecloudaiplatformv1explainrequest *GoogleCloudAiplatformV1ExplainRequest) *ProjectsLocationsEndpointsExplainCall { - c := &ProjectsLocationsEndpointsExplainCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1explainrequest = googlecloudaiplatformv1explainrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsEndpointsOperationsService) Wait(name string) *ProjectsLocationsEndpointsOperationsWaitCall { + c := &ProjectsLocationsEndpointsOperationsWaitCall{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 *ProjectsLocationsEndpointsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsEndpointsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsEndpointsExplainCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsExplainCall { +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsExplainCall) Context(ctx context.Context) *ProjectsLocationsEndpointsExplainCall { +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsExplainCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsExplainCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsEndpointsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1explainrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:explain") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -51236,18 +54485,18 @@ func (c *ProjectsLocationsEndpointsExplainCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.explain" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ExplainResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsExplainCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ExplainResponse, error) { +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51266,7 +54515,7 @@ func (c *ProjectsLocationsEndpointsExplainCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ExplainResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51279,61 +54528,69 @@ func (c *ProjectsLocationsEndpointsExplainCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsFetchPredictOperationCall struct { - s *Service - endpoint string - googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FetchPredictOperation: Fetch an asynchronous online prediction operation. +// Create: Creates a new FeatureGroup in a given project and location. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or -// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod -// el}`. -func (r *ProjectsLocationsEndpointsService) FetchPredictOperation(endpoint string, googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest) *ProjectsLocationsEndpointsFetchPredictOperationCall { - c := &ProjectsLocationsEndpointsFetchPredictOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1fetchpredictoperationrequest = googlecloudaiplatformv1fetchpredictoperationrequest +// - parent: The resource name of the Location to create FeatureGroups. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeatureGroupsService) Create(parent string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsCreateCall { + c := &ProjectsLocationsFeatureGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1featuregroup = googlecloudaiplatformv1featuregroup + return c +} + +// FeatureGroupId sets the optional parameter "featureGroupId": Required. The +// ID to use for this FeatureGroup, which will become the final component of +// the FeatureGroup's resource name. This value may be up to 128 characters, +// and valid characters are `[a-z0-9_]`. The first character cannot be a +// number. The value must be unique within the project and location. +func (c *ProjectsLocationsFeatureGroupsCreateCall) FeatureGroupId(featureGroupId string) *ProjectsLocationsFeatureGroupsCreateCall { + c.urlParams_.Set("featureGroupId", featureGroupId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsFetchPredictOperationCall { +func (c *ProjectsLocationsFeatureGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Context(ctx context.Context) *ProjectsLocationsEndpointsFetchPredictOperationCall { +func (c *ProjectsLocationsFeatureGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchpredictoperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featuregroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:fetchPredictOperation") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -51341,18 +54598,18 @@ func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.fetchPredictOperation" call. +// Do executes the "aiplatform.projects.locations.featureGroups.create" call. // 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 *ProjectsLocationsEndpointsFetchPredictOperationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51384,81 +54641,80 @@ func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsEndpointsGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GenerateContent: Generate content with multimodal inputs. +// Delete: Deletes a single FeatureGroup. // -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsGenerateContentCall { - c := &ProjectsLocationsEndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// - name: The name of the FeatureGroup to be deleted. Format: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsService) Delete(name string) *ProjectsLocationsFeatureGroupsDeleteCall { + c := &ProjectsLocationsFeatureGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, any Features +// under this FeatureGroup will also be deleted. (Otherwise, the request will +// only work if the FeatureGroup has no Features.) +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Force(force bool) *ProjectsLocationsFeatureGroupsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGenerateContentCall { +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGenerateContentCall { +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "model": c.model, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.generateContent" call. +// Do executes the "aiplatform.projects.locations.featureGroups.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51477,7 +54733,7 @@ func (c *ProjectsLocationsEndpointsGenerateContentCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51490,7 +54746,7 @@ func (c *ProjectsLocationsEndpointsGenerateContentCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsEndpointsGetCall struct { +type ProjectsLocationsFeatureGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -51499,12 +54755,11 @@ type ProjectsLocationsEndpointsGetCall struct { header_ http.Header } -// Get: Gets an Endpoint. +// Get: Gets details of a single FeatureGroup. // -// - name: The name of the Endpoint resource. Format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Get(name string) *ProjectsLocationsEndpointsGetCall { - c := &ProjectsLocationsEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the FeatureGroup resource. +func (r *ProjectsLocationsFeatureGroupsService) Get(name string) *ProjectsLocationsFeatureGroupsGetCall { + c := &ProjectsLocationsFeatureGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -51512,7 +54767,7 @@ func (r *ProjectsLocationsEndpointsService) Get(name string) *ProjectsLocationsE // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGetCall { +func (c *ProjectsLocationsFeatureGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -51520,27 +54775,27 @@ func (c *ProjectsLocationsEndpointsGetCall) Fields(s ...googleapi.Field) *Projec // IfNoneMatch sets an 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. -func (c *ProjectsLocationsEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsGetCall { +func (c *ProjectsLocationsFeatureGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGetCall { +func (c *ProjectsLocationsFeatureGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -51561,13 +54816,13 @@ func (c *ProjectsLocationsEndpointsGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.get" call. +// Do executes the "aiplatform.projects.locations.featureGroups.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Endpoint.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1FeatureGroup.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 *ProjectsLocationsEndpointsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Endpoint, error) { +func (c *ProjectsLocationsFeatureGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51586,7 +54841,7 @@ func (c *ProjectsLocationsEndpointsGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Endpoint{ + ret := &GoogleCloudAiplatformV1FeatureGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51599,7 +54854,7 @@ func (c *ProjectsLocationsEndpointsGetCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsEndpointsListCall struct { +type ProjectsLocationsFeatureGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -51608,66 +54863,61 @@ type ProjectsLocationsEndpointsListCall struct { header_ http.Header } -// List: Lists Endpoints in a Location. +// List: Lists FeatureGroups in a given project and location. // -// - parent: The resource name of the Location from which to list the -// Endpoints. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsEndpointsService) List(parent string) *ProjectsLocationsEndpointsListCall { - c := &ProjectsLocationsEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to list FeatureGroups. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeatureGroupsService) List(parent string) *ProjectsLocationsFeatureGroupsListCall { + c := &ProjectsLocationsFeatureGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `endpoint` supports `=` and `!=`. `endpoint` represents the -// Endpoint ID, i.e. the last segment of the Endpoint's resource name. * -// `display_name` supports `=` and `!=`. * `labels` supports general map -// functions that is: * `labels.key=value` - key:value equality * -// `labels.key:*` or `labels:key` - key existence * A key including a space -// must be quoted. `labels."a key". * `base_model_name` only supports `=`. -// Some examples: * `endpoint=1` * `displayName="myDisplayName" * -// `labels.myKey="myValue" * `baseModelName="text-bison" -func (c *ProjectsLocationsEndpointsListCall) Filter(filter string) *ProjectsLocationsEndpointsListCall { +// Filter sets the optional parameter "filter": Lists the FeatureGroups that +// match the filter expression. The following fields are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. +// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, +// `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * +// `labels`: Supports key-value equality and key presence. Examples: * +// `create_time > "2020-01-01" OR update_time > "2020-01-01" FeatureGroups +// created or updated after 2020-01-01. * `labels.env = "prod" FeatureGroups +// with label "env" set to "prod". +func (c *ProjectsLocationsFeatureGroupsListCall) Filter(filter string) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `display_name` * `create_time` * -// `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsEndpointsListCall) OrderBy(orderBy string) *ProjectsLocationsEndpointsListCall { +// for descending. Supported Fields: * `create_time` * `update_time` +func (c *ProjectsLocationsFeatureGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// FeatureGroups to return. The service may return fewer than this value. If +// unspecified, at most 100 FeatureGroups will be returned. The maximum value +// is 100; any value greater than 100 will be coerced to 100. +func (c *ProjectsLocationsFeatureGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListEndpointsResponse.next_page_token of the -// previous EndpointService.ListEndpoints call. -func (c *ProjectsLocationsEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsEndpointsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeatureRegistryService.ListFeatureGroups call. Provide this +// to retrieve the subsequent page. When paginating, all other parameters +// provided to FeatureRegistryService.ListFeatureGroups must match the call +// that provided the page token. +func (c *ProjectsLocationsFeatureGroupsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsEndpointsListCall) ReadMask(readMask string) *ProjectsLocationsEndpointsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsListCall { +func (c *ProjectsLocationsFeatureGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -51675,27 +54925,27 @@ func (c *ProjectsLocationsEndpointsListCall) Fields(s ...googleapi.Field) *Proje // IfNoneMatch sets an 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. -func (c *ProjectsLocationsEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsListCall { +func (c *ProjectsLocationsFeatureGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsEndpointsListCall { +func (c *ProjectsLocationsFeatureGroupsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -51703,7 +54953,7 @@ func (c *ProjectsLocationsEndpointsListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -51716,13 +54966,13 @@ func (c *ProjectsLocationsEndpointsListCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.list" call. +// Do executes the "aiplatform.projects.locations.featureGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListEndpointsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListFeatureGroupsResponse.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 *ProjectsLocationsEndpointsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListEndpointsResponse, error) { +func (c *ProjectsLocationsFeatureGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51741,7 +54991,7 @@ func (c *ProjectsLocationsEndpointsListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListEndpointsResponse{ + ret := &GoogleCloudAiplatformV1ListFeatureGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51757,7 +55007,7 @@ func (c *ProjectsLocationsEndpointsListCall) 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 *ProjectsLocationsEndpointsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListEndpointsResponse) error) error { +func (c *ProjectsLocationsFeatureGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -51775,82 +55025,91 @@ func (c *ProjectsLocationsEndpointsListCall) Pages(ctx context.Context, f func(* } } -type ProjectsLocationsEndpointsMutateDeployedModelCall struct { - s *Service - endpoint string - googlecloudaiplatformv1mutatedeployedmodelrequest *GoogleCloudAiplatformV1MutateDeployedModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MutateDeployedModel: Updates an existing deployed model. Updatable fields -// include `min_replica_count`, `max_replica_count`, -// `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and -// `enable_container_logging` (v1beta1 only). +// Patch: Updates the parameters of a single FeatureGroup. // -// - endpoint: The name of the Endpoint resource into which to mutate a -// DeployedModel. Format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) MutateDeployedModel(endpoint string, googlecloudaiplatformv1mutatedeployedmodelrequest *GoogleCloudAiplatformV1MutateDeployedModelRequest) *ProjectsLocationsEndpointsMutateDeployedModelCall { - c := &ProjectsLocationsEndpointsMutateDeployedModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1mutatedeployedmodelrequest = googlecloudaiplatformv1mutatedeployedmodelrequest +// - name: Identifier. Name of the FeatureGroup. Format: +// `projects/{project}/locations/{location}/featureGroups/{featureGroup}`. +func (r *ProjectsLocationsFeatureGroupsService) Patch(name string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsPatchCall { + c := &ProjectsLocationsFeatureGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1featuregroup = googlecloudaiplatformv1featuregroup + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the FeatureGroup resource by the +// update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then only the non-empty fields +// present in the request will be overwritten. Set the update_mask to `*` to +// override all fields. Updatable fields: * `labels` * `description` * +// `big_query` * `big_query.entity_id_columns` +func (c *ProjectsLocationsFeatureGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureGroupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsMutateDeployedModelCall { +func (c *ProjectsLocationsFeatureGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsMutateDeployedModelCall { +func (c *ProjectsLocationsFeatureGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1mutatedeployedmodelrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featuregroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:mutateDeployedModel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.mutateDeployedModel" call. +// Do executes the "aiplatform.projects.locations.featureGroups.patch" call. // 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 *ProjectsLocationsEndpointsMutateDeployedModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51882,84 +55141,81 @@ func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsEndpointsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Endpoint. +// BatchCreate: Creates a batch of Features in a given FeatureGroup. // -// - name: Output only. The resource name of the Endpoint. -func (r *ProjectsLocationsEndpointsService) Patch(name string, googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint) *ProjectsLocationsEndpointsPatchCall { - c := &ProjectsLocationsEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1endpoint = googlecloudaiplatformv1endpoint - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. See google.protobuf.FieldMask. -func (c *ProjectsLocationsEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The resource name of the EntityType/FeatureGroup to create the +// batch of Features under. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { + c := &ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPatchCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPatchCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1endpoint) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.patch" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.batchCreate" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Endpoint.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Endpoint, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51978,7 +55234,7 @@ func (c *ProjectsLocationsEndpointsPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Endpoint{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51991,59 +55247,72 @@ func (c *ProjectsLocationsEndpointsPatchCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsEndpointsPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Predict: Perform an online prediction. +// Create: Creates a new Feature in a given FeatureGroup. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Predict(endpoint string, googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest) *ProjectsLocationsEndpointsPredictCall { - c := &ProjectsLocationsEndpointsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1predictrequest = googlecloudaiplatformv1predictrequest +// - parent: The resource name of the EntityType or FeatureGroup to create a +// Feature. Format for entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { + c := &ProjectsLocationsFeatureGroupsFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature + return c +} + +// FeatureId sets the optional parameter "featureId": Required. The ID to use +// for the Feature, which will become the final component of the Feature's +// resource name. This value may be up to 128 characters, and valid characters +// are `[a-z0-9_]`. The first character cannot be a number. The value must be +// unique within an EntityType/FeatureGroup. +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { + c.urlParams_.Set("featureId", featureId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsPredictCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsPredictCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -52051,18 +55320,18 @@ func (c *ProjectsLocationsEndpointsPredictCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.predict" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PredictResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PredictResponse, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52081,7 +55350,7 @@ func (c *ProjectsLocationsEndpointsPredictCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PredictResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52094,80 +55363,75 @@ func (c *ProjectsLocationsEndpointsPredictCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsPredictLongRunningCall struct { - s *Service - endpoint string - googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PredictLongRunning: +// Delete: Deletes a single Feature. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or -// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod -// el}`. -func (r *ProjectsLocationsEndpointsService) PredictLongRunning(endpoint string, googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest) *ProjectsLocationsEndpointsPredictLongRunningCall { - c := &ProjectsLocationsEndpointsPredictLongRunningCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1predictlongrunningrequest = googlecloudaiplatformv1predictlongrunningrequest +// - name: The name of the Features to be deleted. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}/features/{feature}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat +// ures/{feature}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) Delete(name string) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { + c := &ProjectsLocationsFeatureGroupsFeaturesDeleteCall{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 // details. -func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPredictLongRunningCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPredictLongRunningCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsPredictLongRunningCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictlongrunningrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predictLongRunning") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.predictLongRunning" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.delete" call. // 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 *ProjectsLocationsEndpointsPredictLongRunningCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52199,82 +55463,86 @@ func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsEndpointsRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RawPredict: Perform an online prediction with an arbitrary HTTP payload. The -// response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: -// ID of the Endpoint that served this prediction. * -// `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that -// served this prediction. +// Get: Gets details of a single Feature. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) RawPredict(endpoint string, googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest) *ProjectsLocationsEndpointsRawPredictCall { - c := &ProjectsLocationsEndpointsRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1rawpredictrequest = googlecloudaiplatformv1rawpredictrequest +// - name: The name of the Feature resource. Format for entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) Get(name string) *ProjectsLocationsFeatureGroupsFeaturesGetCall { + c := &ProjectsLocationsFeatureGroupsFeaturesGetCall{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 // details. -func (c *ProjectsLocationsEndpointsRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsRawPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsRawPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsRawPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rawpredictrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+endpoint}:rawPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.rawPredict" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.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 *ProjectsLocationsEndpointsRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *GoogleCloudAiplatformV1Feature.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 *ProjectsLocationsFeatureGroupsFeaturesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52293,7 +55561,7 @@ func (c *ProjectsLocationsEndpointsRawPredictCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudAiplatformV1Feature{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52306,186 +55574,150 @@ func (c *ProjectsLocationsEndpointsRawPredictCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsEndpointsServerStreamingPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ServerStreamingPredict: Perform a server-side streaming online prediction -// request for Vertex LLM streaming. +// List: Lists Features in a given FeatureGroup. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) ServerStreamingPredict(endpoint string, googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest) *ProjectsLocationsEndpointsServerStreamingPredictCall { - c := &ProjectsLocationsEndpointsServerStreamingPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1streamingpredictrequest = googlecloudaiplatformv1streamingpredictrequest +// - parent: The resource name of the Location to list Features. Format for +// entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) List(parent string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c := &ProjectsLocationsFeatureGroupsFeaturesListCall{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 -// details. -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsServerStreamingPredictCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Filter sets the optional parameter "filter": Lists the Features that match +// the filter expression. The following filters are supported: * `value_type`: +// Supports = and != comparisons. * `create_time`: Supports =, !=, <, >, >=, +// and <= comparisons. Values must be in RFC 3339 format. * `update_time`: +// Supports =, !=, <, >, >=, and <= comparisons. Values must be in RFC 3339 +// format. * `labels`: Supports key-value equality as well as key presence. +// Examples: * `value_type = DOUBLE` --> Features whose type is DOUBLE. * +// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > +// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after +// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` +// --> Features having both (active: yes) and (env: prod) labels. * +// `labels.env: *` --> Any Feature which has a label with 'env' as the key. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Filter(filter string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("filter", filter) return c } -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsServerStreamingPredictCall { - c.ctx_ = ctx +// LatestStatsCount sets the optional parameter "latestStatsCount": Only +// applicable for Vertex AI Feature Store (Legacy). If set, return the most +// recent ListFeaturesRequest.latest_stats_count of stats for each Feature in +// response. Valid value is [0, 10]. If number of stats exists < +// ListFeaturesRequest.latest_stats_count, return all existing stats. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) LatestStatsCount(latestStatsCount int64) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("latestStatsCount", fmt.Sprint(latestStatsCount)) return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingpredictrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:serverStreamingPredict") - 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{ - "endpoint": c.endpoint, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `feature_id` * `value_type` (Not +// supported for FeatureRegistry Feature) * `create_time` * `update_time` +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// Do executes the "aiplatform.projects.locations.endpoints.serverStreamingPredict" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1StreamingPredictResponse.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 *ProjectsLocationsEndpointsServerStreamingPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1StreamingPredictResponse, 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 := &GoogleCloudAiplatformV1StreamingPredictResponse{ - 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 +// PageSize sets the optional parameter "pageSize": The maximum number of +// Features to return. The service may return fewer than this value. If +// unspecified, at most 1000 Features will be returned. The maximum value is +// 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -type ProjectsLocationsEndpointsStreamGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeaturestoreService.ListFeatures call or +// FeatureRegistryService.ListFeatures call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must +// match the call that provided the page token. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// StreamGenerateContent: Generate content with multimodal inputs with -// streaming support. -// -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { - c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) ReadMask(readMask string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamGenerateContentCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamGenerateContentCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+model}:streamGenerateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "model": c.model, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.streamGenerateContent" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListFeaturesResponse.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 *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52504,7 +55736,7 @@ func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleCloudAiplatformV1ListFeaturesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52517,79 +55749,119 @@ func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsEndpointsStreamRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsFeatureGroupsFeaturesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// StreamRawPredict: Perform a streaming online prediction with an arbitrary -// HTTP payload. +type ProjectsLocationsFeatureGroupsFeaturesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Feature. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest) *ProjectsLocationsEndpointsStreamRawPredictCall { - c := &ProjectsLocationsEndpointsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1streamrawpredictrequest = googlecloudaiplatformv1streamrawpredictrequest +// - name: Immutable. Name of the Feature. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}/features/{feature}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat +// ures/{feature}` The last part feature is assigned by the client. The +// feature can be up to 64 characters long and can consist only of ASCII +// Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting +// with a letter. The value will be unique given an entity type. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) Patch(name string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { + c := &ProjectsLocationsFeatureGroupsFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the Features resource by the update. +// The fields specified in the update_mask are relative to the resource, not +// the full request. A field will be overwritten if it is in the mask. If the +// user does not provide a mask then only the non-empty fields present in the +// request will be overwritten. Set the update_mask to `*` to override all +// fields. Updatable fields: * `description` * `labels` * `disable_monitoring` +// (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not +// supported for FeaturestoreService FeatureStore) +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamRawPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamRawPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamrawpredictrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:streamRawPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.streamRawPredict" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.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 *ProjectsLocationsEndpointsStreamRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *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 *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52608,7 +55880,7 @@ func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52621,80 +55893,74 @@ func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEndpointsUndeployModelCall struct { - s *Service - endpoint string - googlecloudaiplatformv1undeploymodelrequest *GoogleCloudAiplatformV1UndeployModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UndeployModel: Undeploys a Model from an Endpoint, removing a DeployedModel -// from it, and freeing all resources it's using. +// 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`. // -// - endpoint: The name of the Endpoint resource from which to undeploy a -// Model. Format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) UndeployModel(endpoint string, googlecloudaiplatformv1undeploymodelrequest *GoogleCloudAiplatformV1UndeployModelRequest) *ProjectsLocationsEndpointsUndeployModelCall { - c := &ProjectsLocationsEndpointsUndeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1undeploymodelrequest = googlecloudaiplatformv1undeploymodelrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Delete(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { + c := &ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsEndpointsUndeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsUndeployModelCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsUndeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsUndeployModelCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsUndeployModelCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsUndeployModelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1undeploymodelrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:undeployModel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.undeployModel" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.delete" call. // 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 *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52713,7 +55979,7 @@ func (c *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallO 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, @@ -52726,60 +55992,68 @@ func (c *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEndpointsUpdateCall struct { - s *Service - name string - googlecloudaiplatformv1updateendpointlongrunningrequest *GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates an Endpoint with a long running operation. +// 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: Output only. The resource name of the Endpoint. -func (r *ProjectsLocationsEndpointsService) Update(name string, googlecloudaiplatformv1updateendpointlongrunningrequest *GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest) *ProjectsLocationsEndpointsUpdateCall { - c := &ProjectsLocationsEndpointsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Get(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { + c := &ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1updateendpointlongrunningrequest = googlecloudaiplatformv1updateendpointlongrunningrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsUpdateCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsUpdateCall) Context(ctx context.Context) *ProjectsLocationsEndpointsUpdateCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsUpdateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1updateendpointlongrunningrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:update") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -52790,13 +56064,13 @@ func (c *ProjectsLocationsEndpointsUpdateCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.update" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.get" call. // 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 *ProjectsLocationsEndpointsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52828,78 +56102,104 @@ func (c *ProjectsLocationsEndpointsUpdateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsChatCompletionsCall struct { - s *Service - endpoint string - googleapihttpbody *GoogleApiHttpBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Completions: Exposes an OpenAI-compatible endpoint for chat completions. +// ListWait: Lists operations that match the specified filter in the request. +// If the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - endpoint: The name of the endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsChatService) Completions(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsChatCompletionsCall { - c := &ProjectsLocationsEndpointsChatCompletionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googleapihttpbody = googleapihttpbody +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) ListWait(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c := &ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + 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 // details. -func (c *ProjectsLocationsEndpointsChatCompletionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsChatCompletionsCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsChatCompletionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointsChatCompletionsCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsChatCompletionsCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsChatCompletionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+endpoint}/chat/completions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.chat.completions" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.listWait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.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 *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *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 *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52918,7 +56218,7 @@ func (c *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52931,7 +56231,28 @@ func (c *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsEndpointsOperationsCancelCall struct { +// 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -52939,52 +56260,61 @@ type ProjectsLocationsEndpointsOperationsCancelCall 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 *ProjectsLocationsEndpointsOperationsService) Cancel(name string) *ProjectsLocationsEndpointsOperationsCancelCall { - c := &ProjectsLocationsEndpointsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Wait(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { + c := &ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall{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 *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsEndpointsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsCancelCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsCancelCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -52997,13 +56327,13 @@ func (c *ProjectsLocationsEndpointsOperationsCancelCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.wait" call. // 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 *ProjectsLocationsEndpointsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53022,7 +56352,7 @@ func (c *ProjectsLocationsEndpointsOperationsCancelCall) Do(opts ...googleapi.Ca 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, @@ -53035,7 +56365,7 @@ func (c *ProjectsLocationsEndpointsOperationsCancelCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEndpointsOperationsDeleteCall struct { +type ProjectsLocationsFeatureGroupsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53049,8 +56379,8 @@ type ProjectsLocationsEndpointsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsEndpointsOperationsService) Delete(name string) *ProjectsLocationsEndpointsOperationsDeleteCall { - c := &ProjectsLocationsEndpointsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeatureGroupsOperationsService) Delete(name string) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { + c := &ProjectsLocationsFeatureGroupsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -53058,27 +56388,27 @@ func (r *ProjectsLocationsEndpointsOperationsService) Delete(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsDeleteCall { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsDeleteCall { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -53096,13 +56426,13 @@ func (c *ProjectsLocationsEndpointsOperationsDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featureGroups.operations.delete" call. // 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 *ProjectsLocationsEndpointsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53134,7 +56464,7 @@ func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEndpointsOperationsGetCall struct { +type ProjectsLocationsFeatureGroupsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53148,8 +56478,8 @@ type ProjectsLocationsEndpointsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsEndpointsOperationsService) Get(name string) *ProjectsLocationsEndpointsOperationsGetCall { - c := &ProjectsLocationsEndpointsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeatureGroupsOperationsService) Get(name string) *ProjectsLocationsFeatureGroupsOperationsGetCall { + c := &ProjectsLocationsFeatureGroupsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -53157,7 +56487,7 @@ func (r *ProjectsLocationsEndpointsOperationsService) Get(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsGetCall { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53165,27 +56495,27 @@ func (c *ProjectsLocationsEndpointsOperationsGetCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an 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. -func (c *ProjectsLocationsEndpointsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsOperationsGetCall { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsGetCall { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53206,13 +56536,13 @@ func (c *ProjectsLocationsEndpointsOperationsGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.get" call. +// Do executes the "aiplatform.projects.locations.featureGroups.operations.get" call. // 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 *ProjectsLocationsEndpointsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53244,7 +56574,7 @@ func (c *ProjectsLocationsEndpointsOperationsGetCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEndpointsOperationsListCall struct { +type ProjectsLocationsFeatureGroupsOperationsListWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53253,32 +56583,32 @@ type ProjectsLocationsEndpointsOperationsListCall struct { 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`. +// ListWait: 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 *ProjectsLocationsEndpointsOperationsService) List(name string) *ProjectsLocationsEndpointsOperationsListCall { - c := &ProjectsLocationsEndpointsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeatureGroupsOperationsService) ListWait(name string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { + c := &ProjectsLocationsFeatureGroupsOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsEndpointsOperationsListCall) Filter(filter string) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsEndpointsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsEndpointsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -53286,7 +56616,7 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) PageToken(pageToken strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53294,27 +56624,27 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) Fields(s ...googleapi.Fie // IfNoneMatch sets an 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. -func (c *ProjectsLocationsEndpointsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53322,7 +56652,7 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -53335,13 +56665,13 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.list" call. +// Do executes the "aiplatform.projects.locations.featureGroups.operations.listWait" call. // 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 *ProjectsLocationsEndpointsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53376,7 +56706,7 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) Do(opts ...googleapi.Call // 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 *ProjectsLocationsEndpointsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -53394,7 +56724,7 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) Pages(ctx context.Context } } -type ProjectsLocationsEndpointsOperationsWaitCall struct { +type ProjectsLocationsFeatureGroupsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53413,8 +56743,8 @@ type ProjectsLocationsEndpointsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsEndpointsOperationsService) Wait(name string) *ProjectsLocationsEndpointsOperationsWaitCall { - c := &ProjectsLocationsEndpointsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeatureGroupsOperationsService) Wait(name string) *ProjectsLocationsFeatureGroupsOperationsWaitCall { + c := &ProjectsLocationsFeatureGroupsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -53423,7 +56753,7 @@ func (r *ProjectsLocationsEndpointsOperationsService) Wait(name string) *Project // 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 *ProjectsLocationsEndpointsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsEndpointsOperationsWaitCall { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureGroupsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -53431,27 +56761,27 @@ func (c *ProjectsLocationsEndpointsOperationsWaitCall) Timeout(timeout string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsWaitCall { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsWaitCall { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -53469,13 +56799,13 @@ func (c *ProjectsLocationsEndpointsOperationsWaitCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featureGroups.operations.wait" call. // 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 *ProjectsLocationsEndpointsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53507,69 +56837,70 @@ func (c *ProjectsLocationsEndpointsOperationsWaitCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsFeatureGroupsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new FeatureGroup in a given project and location. +// Create: Creates a new FeatureOnlineStore in a given project and location. // -// - parent: The resource name of the Location to create FeatureGroups. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeatureGroupsService) Create(parent string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsCreateCall { - c := &ProjectsLocationsFeatureGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to create FeatureOnlineStores. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeatureOnlineStoresService) Create(parent string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresCreateCall { + c := &ProjectsLocationsFeatureOnlineStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1featuregroup = googlecloudaiplatformv1featuregroup + c.googlecloudaiplatformv1featureonlinestore = googlecloudaiplatformv1featureonlinestore return c } -// FeatureGroupId sets the optional parameter "featureGroupId": Required. The -// ID to use for this FeatureGroup, which will become the final component of -// the FeatureGroup's resource name. This value may be up to 128 characters, -// and valid characters are `[a-z0-9_]`. The first character cannot be a -// number. The value must be unique within the project and location. -func (c *ProjectsLocationsFeatureGroupsCreateCall) FeatureGroupId(featureGroupId string) *ProjectsLocationsFeatureGroupsCreateCall { - c.urlParams_.Set("featureGroupId", featureGroupId) +// FeatureOnlineStoreId sets the optional parameter "featureOnlineStoreId": +// Required. The ID to use for this FeatureOnlineStore, which will become the +// final component of the FeatureOnlineStore's resource name. This value may be +// up to 60 characters, and valid characters are `[a-z0-9_]`. The first +// character cannot be a number. The value must be unique within the project +// and location. +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) FeatureOnlineStoreId(featureOnlineStoreId string) *ProjectsLocationsFeatureOnlineStoresCreateCall { + c.urlParams_.Set("featureOnlineStoreId", featureOnlineStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featuregroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureonlinestore) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureOnlineStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -53582,13 +56913,13 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.create" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.create" call. // 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 *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53620,7 +56951,7 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsFeatureGroupsDeleteCall struct { +type ProjectsLocationsFeatureOnlineStoresDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53628,20 +56959,22 @@ type ProjectsLocationsFeatureGroupsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single FeatureGroup. +// Delete: Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not +// contain any FeatureViews. // -// - name: The name of the FeatureGroup to be deleted. Format: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsService) Delete(name string) *ProjectsLocationsFeatureGroupsDeleteCall { - c := &ProjectsLocationsFeatureGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the FeatureOnlineStore to be deleted. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}`. +func (r *ProjectsLocationsFeatureOnlineStoresService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresDeleteCall { + c := &ProjectsLocationsFeatureOnlineStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any Features -// under this FeatureGroup will also be deleted. (Otherwise, the request will -// only work if the FeatureGroup has no Features.) -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Force(force bool) *ProjectsLocationsFeatureGroupsDeleteCall { +// Force sets the optional parameter "force": If set to true, any FeatureViews +// and Features for this FeatureOnlineStore will also be deleted. (Otherwise, +// the request will only work if the FeatureOnlineStore has no FeatureViews.) +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Force(force bool) *ProjectsLocationsFeatureOnlineStoresDeleteCall { c.urlParams_.Set("force", fmt.Sprint(force)) return c } @@ -53649,27 +56982,27 @@ func (c *ProjectsLocationsFeatureGroupsDeleteCall) Force(force bool) *ProjectsLo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -53687,13 +57020,13 @@ func (c *ProjectsLocationsFeatureGroupsDeleteCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.delete" call. // 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 *ProjectsLocationsFeatureGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53725,7 +57058,7 @@ func (c *ProjectsLocationsFeatureGroupsDeleteCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsFeatureGroupsGetCall struct { +type ProjectsLocationsFeatureOnlineStoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53734,11 +57067,11 @@ type ProjectsLocationsFeatureGroupsGetCall struct { header_ http.Header } -// Get: Gets details of a single FeatureGroup. +// Get: Gets details of a single FeatureOnlineStore. // -// - name: The name of the FeatureGroup resource. -func (r *ProjectsLocationsFeatureGroupsService) Get(name string) *ProjectsLocationsFeatureGroupsGetCall { - c := &ProjectsLocationsFeatureGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the FeatureOnlineStore resource. +func (r *ProjectsLocationsFeatureOnlineStoresService) Get(name string) *ProjectsLocationsFeatureOnlineStoresGetCall { + c := &ProjectsLocationsFeatureOnlineStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -53746,7 +57079,7 @@ func (r *ProjectsLocationsFeatureGroupsService) Get(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53754,27 +57087,27 @@ func (c *ProjectsLocationsFeatureGroupsGetCall) Fields(s ...googleapi.Field) *Pr // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53795,13 +57128,13 @@ func (c *ProjectsLocationsFeatureGroupsGetCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FeatureGroup.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1FeatureOnlineStore.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 *ProjectsLocationsFeatureGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureGroup, error) { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureOnlineStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53820,7 +57153,7 @@ func (c *ProjectsLocationsFeatureGroupsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FeatureGroup{ + ret := &GoogleCloudAiplatformV1FeatureOnlineStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53833,7 +57166,123 @@ func (c *ProjectsLocationsFeatureGroupsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsFeatureGroupsListCall struct { +type ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsFeatureOnlineStoresService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.featureOnlineStores.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + 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 +} + +type ProjectsLocationsFeatureOnlineStoresListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -53842,26 +57291,26 @@ type ProjectsLocationsFeatureGroupsListCall struct { header_ http.Header } -// List: Lists FeatureGroups in a given project and location. +// List: Lists FeatureOnlineStores in a given project and location. // -// - parent: The resource name of the Location to list FeatureGroups. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeatureGroupsService) List(parent string) *ProjectsLocationsFeatureGroupsListCall { - c := &ProjectsLocationsFeatureGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to list FeatureOnlineStores. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeatureOnlineStoresService) List(parent string) *ProjectsLocationsFeatureOnlineStoresListCall { + c := &ProjectsLocationsFeatureOnlineStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Lists the FeatureGroups that -// match the filter expression. The following fields are supported: * +// Filter sets the optional parameter "filter": Lists the FeatureOnlineStores +// that match the filter expression. The following fields are supported: * // `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. // Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, // `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * // `labels`: Supports key-value equality and key presence. Examples: * -// `create_time > "2020-01-01" OR update_time > "2020-01-01" FeatureGroups -// created or updated after 2020-01-01. * `labels.env = "prod" FeatureGroups -// with label "env" set to "prod". -func (c *ProjectsLocationsFeatureGroupsListCall) Filter(filter string) *ProjectsLocationsFeatureGroupsListCall { +// `create_time > "2020-01-01" OR update_time > "2020-01-01" +// FeatureOnlineStores created or updated after 2020-01-01. * `labels.env = +// "prod" FeatureOnlineStores with label "env" set to "prod". +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("filter", filter) return c } @@ -53869,26 +57318,27 @@ func (c *ProjectsLocationsFeatureGroupsListCall) Filter(filter string) *Projects // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported Fields: * `create_time` * `update_time` -func (c *ProjectsLocationsFeatureGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// FeatureGroups to return. The service may return fewer than this value. If -// unspecified, at most 100 FeatureGroups will be returned. The maximum value -// is 100; any value greater than 100 will be coerced to 100. -func (c *ProjectsLocationsFeatureGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsListCall { +// FeatureOnlineStores to return. The service may return fewer than this value. +// If unspecified, at most 100 FeatureOnlineStores will be returned. The +// maximum value is 100; any value greater than 100 will be coerced to 100. +func (c *ProjectsLocationsFeatureOnlineStoresListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeatureRegistryService.ListFeatureGroups call. Provide this -// to retrieve the subsequent page. When paginating, all other parameters -// provided to FeatureRegistryService.ListFeatureGroups must match the call +// from a previous FeatureOnlineStoreAdminService.ListFeatureOnlineStores call. +// Provide this to retrieve the subsequent page. When paginating, all other +// parameters provided to +// FeatureOnlineStoreAdminService.ListFeatureOnlineStores must match the call // that provided the page token. -func (c *ProjectsLocationsFeatureGroupsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -53896,7 +57346,7 @@ func (c *ProjectsLocationsFeatureGroupsListCall) PageToken(pageToken string) *Pr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53904,27 +57354,27 @@ func (c *ProjectsLocationsFeatureGroupsListCall) Fields(s ...googleapi.Field) *P // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53932,7 +57382,7 @@ func (c *ProjectsLocationsFeatureGroupsListCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureOnlineStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -53945,13 +57395,15 @@ func (c *ProjectsLocationsFeatureGroupsListCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.list" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeatureGroupsResponse.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 +// *GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse.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 *ProjectsLocationsFeatureGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureGroupsResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53970,7 +57422,7 @@ func (c *ProjectsLocationsFeatureGroupsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeatureGroupsResponse{ + ret := &GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53986,7 +57438,7 @@ func (c *ProjectsLocationsFeatureGroupsListCall) 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 *ProjectsLocationsFeatureGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureGroupsResponse) error) error { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -54004,35 +57456,37 @@ func (c *ProjectsLocationsFeatureGroupsListCall) Pages(ctx context.Context, f fu } } -type ProjectsLocationsFeatureGroupsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresPatchCall struct { + s *Service + name string + googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single FeatureGroup. +// Patch: Updates the parameters of a single FeatureOnlineStore. // -// - name: Identifier. Name of the FeatureGroup. Format: -// `projects/{project}/locations/{location}/featureGroups/{featureGroup}`. -func (r *ProjectsLocationsFeatureGroupsService) Patch(name string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsPatchCall { - c := &ProjectsLocationsFeatureGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. Name of the FeatureOnlineStore. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline +// Store}`. +func (r *ProjectsLocationsFeatureOnlineStoresService) Patch(name string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresPatchCall { + c := &ProjectsLocationsFeatureOnlineStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1featuregroup = googlecloudaiplatformv1featuregroup + c.googlecloudaiplatformv1featureonlinestore = googlecloudaiplatformv1featureonlinestore return c } // UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the FeatureGroup resource by the -// update. The fields specified in the update_mask are relative to the +// specify the fields to be overwritten in the FeatureOnlineStore resource by +// the update. The fields specified in the update_mask are relative to the // resource, not the full request. A field will be overwritten if it is in the // mask. If the user does not provide a mask then only the non-empty fields // present in the request will be overwritten. Set the update_mask to `*` to // override all fields. Updatable fields: * `labels` * `description` * -// `big_query` * `big_query.entity_id_columns` -func (c *ProjectsLocationsFeatureGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureGroupsPatchCall { +// `bigtable` * `bigtable.auto_scaling` * +// `bigtable.enable_multi_region_replica` +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -54040,30 +57494,30 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) UpdateMask(updateMask string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featuregroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureonlinestore) if err != nil { return nil, err } @@ -54082,13 +57536,13 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.patch" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.patch" call. // 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 *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54120,62 +57574,174 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsFeatureOnlineStoresService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.featureOnlineStores.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + 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 +} + +type ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates a batch of Features in a given FeatureGroup. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - parent: The resource name of the EntityType/FeatureGroup to create the -// batch of Features under. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { - c := &ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsFeatureOnlineStoresService) TestIamPermissions(resource string) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { + c := &ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// Permissions sets the optional parameter "permissions": The set of +// permissions to check for the `resource`. Permissions with wildcards (such as +// `*` or `storage.*`) are not allowed. For more information see IAM Overview +// (https://cloud.google.com/iam/docs/overview#permissions). +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -54183,18 +57749,18 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.batchCreate" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.testIamPermissions" call. // 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 +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54213,7 +57779,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54226,72 +57792,79 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Feature in a given FeatureGroup. +// Create: Creates a new FeatureView in a given FeatureOnlineStore. // -// - parent: The resource name of the EntityType or FeatureGroup to create a -// Feature. Format for entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { - c := &ProjectsLocationsFeatureGroupsFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the FeatureOnlineStore to create +// FeatureViews. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Create(parent string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature + c.googlecloudaiplatformv1featureview = googlecloudaiplatformv1featureview return c } -// FeatureId sets the optional parameter "featureId": Required. The ID to use -// for the Feature, which will become the final component of the Feature's -// resource name. This value may be up to 128 characters, and valid characters -// are `[a-z0-9_]`. The first character cannot be a number. The value must be -// unique within an EntityType/FeatureGroup. -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { - c.urlParams_.Set("featureId", featureId) +// FeatureViewId sets the optional parameter "featureViewId": Required. The ID +// to use for the FeatureView, which will become the final component of the +// FeatureView's resource name. This value may be up to 60 characters, and +// valid characters are `[a-z0-9_]`. The first character cannot be a number. +// The value must be unique within a FeatureOnlineStore. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) FeatureViewId(featureViewId string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { + c.urlParams_.Set("featureViewId", featureViewId) + return c +} + +// RunSyncImmediately sets the optional parameter "runSyncImmediately": +// Immutable. If set to true, one on demand sync will be run immediately, +// regardless whether the FeatureView.sync_config is configured or not. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) RunSyncImmediately(runSyncImmediately bool) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { + c.urlParams_.Set("runSyncImmediately", fmt.Sprint(runSyncImmediately)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureview) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViews") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -54304,13 +57877,13 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.create" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.create" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54342,7 +57915,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesDeleteCall struct { +type ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -54350,15 +57923,13 @@ type ProjectsLocationsFeatureGroupsFeaturesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Feature. +// Delete: Deletes a single FeatureView. // -// - name: The name of the Features to be deleted. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat -// ures/{feature}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) Delete(name string) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { - c := &ProjectsLocationsFeatureGroupsFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the FeatureView to be deleted. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -54366,27 +57937,27 @@ func (r *ProjectsLocationsFeatureGroupsFeaturesService) Delete(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -54404,13 +57975,13 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.delete" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54442,86 +58013,79 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall struct { + s *Service + featureView string + googlecloudaiplatformv1fetchfeaturevaluesrequest *GoogleCloudAiplatformV1FetchFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single Feature. +// FetchFeatureValues: Fetch feature values under a FeatureView. // -// - name: The name of the Feature resource. Format for entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) Get(name string) *ProjectsLocationsFeatureGroupsFeaturesGetCall { - c := &ProjectsLocationsFeatureGroupsFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - featureView: FeatureView resource format +// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline +// Store}/featureViews/{featureView}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) FetchFeatureValues(featureView string, googlecloudaiplatformv1fetchfeaturevaluesrequest *GoogleCloudAiplatformV1FetchFeatureValuesRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featureView = featureView + c.googlecloudaiplatformv1fetchfeaturevaluesrequest = googlecloudaiplatformv1fetchfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchfeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:fetchFeatureValues") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "featureView": c.featureView, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.fetchFeatureValues" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Feature.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1FetchFeatureValuesResponse.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 *ProjectsLocationsFeatureGroupsFeaturesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FetchFeatureValuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54540,7 +58104,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Feature{ + ret := &GoogleCloudAiplatformV1FetchFeatureValuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54553,95 +58117,30 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesListCall struct { +type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Features in a given FeatureGroup. +// Get: Gets details of a single FeatureView. // -// - parent: The resource name of the Location to list Features. Format for -// entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) List(parent string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c := &ProjectsLocationsFeatureGroupsFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the Features that match -// the filter expression. The following filters are supported: * `value_type`: -// Supports = and != comparisons. * `create_time`: Supports =, !=, <, >, >=, -// and <= comparisons. Values must be in RFC 3339 format. * `update_time`: -// Supports =, !=, <, >, >=, and <= comparisons. Values must be in RFC 3339 -// format. * `labels`: Supports key-value equality as well as key presence. -// Examples: * `value_type = DOUBLE` --> Features whose type is DOUBLE. * -// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > -// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after -// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` -// --> Features having both (active: yes) and (env: prod) labels. * -// `labels.env: *` --> Any Feature which has a label with 'env' as the key. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Filter(filter string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// LatestStatsCount sets the optional parameter "latestStatsCount": Only -// applicable for Vertex AI Feature Store (Legacy). If set, return the most -// recent ListFeaturesRequest.latest_stats_count of stats for each Feature in -// response. Valid value is [0, 10]. If number of stats exists < -// ListFeaturesRequest.latest_stats_count, return all existing stats. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) LatestStatsCount(latestStatsCount int64) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("latestStatsCount", fmt.Sprint(latestStatsCount)) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `feature_id` * `value_type` (Not -// supported for FeatureRegistry Feature) * `create_time` * `update_time` -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Features to return. The service may return fewer than this value. If -// unspecified, at most 1000 Features will be returned. The maximum value is -// 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.ListFeatures call or -// FeatureRegistryService.ListFeatures call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must -// match the call that provided the page token. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) ReadMask(readMask string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the FeatureView resource. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall{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 // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesListCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -54649,27 +58148,27 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Fields(s ...googleapi.F // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesListCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesListCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -54677,7 +58176,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -54685,18 +58184,18 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) doRequest(alt string) ( } 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.featureGroups.features.list" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeaturesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1FeatureView.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 *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturesResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54715,7 +58214,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeaturesResponse{ + ret := &GoogleCloudAiplatformV1FeatureView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54728,119 +58227,91 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.Ca return ret, nil } -// 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 *ProjectsLocationsFeatureGroupsFeaturesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsFeatureGroupsFeaturesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single Feature. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: Immutable. Name of the Feature. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat -// ures/{feature}` The last part feature is assigned by the client. The -// feature can be up to 64 characters long and can consist only of ASCII -// Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting -// with a letter. The value will be unique given an entity type. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) Patch(name string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { - c := &ProjectsLocationsFeatureGroupsFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Features resource by the update. -// The fields specified in the update_mask are relative to the resource, not -// the full request. A field will be overwritten if it is in the mask. If the -// user does not provide a mask then only the non-empty fields present in the -// request will be overwritten. Set the update_mask to `*` to override all -// fields. Updatable fields: * `description` * `labels` * `disable_monitoring` -// (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not -// supported for FeaturestoreService FeatureStore) -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.patch" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.getIamPolicy" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54859,7 +58330,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54872,74 +58343,130 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists FeatureViews in a given FeatureOnlineStore. +// +// - parent: The resource name of the FeatureOnlineStore to list FeatureViews. +// Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) List(parent string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the FeatureViews that +// match the filter expression. The following filters are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. +// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, +// `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339 format. * +// `labels`: Supports key-value equality as well as key presence. Examples: * +// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > +// \"2020-01-31T15:30:00.000000Z\" --> FeatureViews created or updated after +// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` +// --> FeatureViews having both (active: yes) and (env: prod) labels. * +// `labels.env: *` --> Any FeatureView which has a label with 'env' as the key. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `feature_view_id` * `create_time` * +// `update_time` +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// FeatureViews to return. The service may return fewer than this value. If +// unspecified, at most 1000 FeatureViews will be returned. The maximum value +// is 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Delete(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { - c := &ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeatureOnlineStoreAdminService.ListFeatureViews call. +// Provide this to retrieve the subsequent page. When paginating, all other +// parameters provided to FeatureOnlineStoreAdminService.ListFeatureViews must +// match the call that provided the page token. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + 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 // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViews") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.list" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListFeatureViewsResponse.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureViewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54958,7 +58485,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListFeatureViewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54971,68 +58498,99 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureViewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// 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. +type ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single FeatureView. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Get(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { - c := &ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. Name of the FeatureView. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Patch(name string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1featureview = googlecloudaiplatformv1featureview + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the FeatureView resource by the +// update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then only the non-empty fields +// present in the request will be overwritten. Set the update_mask to `*` to +// override all fields. Updatable fields: * `labels` * `service_agent_type` * +// `big_query_source` * `big_query_source.uri` * +// `big_query_source.entity_id_columns` * `feature_registry_source` * +// `feature_registry_source.feature_groups` * `sync_config` * +// `sync_config.cron` * `optimized_config.automatic_resources` +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureview) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -55043,13 +58601,13 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.patch" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55081,104 +58639,81 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall struct { + s *Service + featureView string + googlecloudaiplatformv1searchnearestentitiesrequest *GoogleCloudAiplatformV1SearchNearestEntitiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListWait: Lists operations that match the specified filter in the request. -// If the server doesn't support this method, it returns `UNIMPLEMENTED`. +// SearchNearestEntities: Search the nearest entities under a FeatureView. +// Search only works for indexable feature view; if a feature view isn't +// indexable, returns Invalid argument response. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) ListWait(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c := &ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c.urlParams_.Set("pageToken", pageToken) +// - featureView: FeatureView resource format +// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline +// Store}/featureViews/{featureView}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SearchNearestEntities(featureView string, googlecloudaiplatformv1searchnearestentitiesrequest *GoogleCloudAiplatformV1SearchNearestEntitiesRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featureView = featureView + c.googlecloudaiplatformv1searchnearestentitiesrequest = googlecloudaiplatformv1searchnearestentitiesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchnearestentitiesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:searchNearestEntities") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "featureView": c.featureView, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.listWait" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.searchNearestEntities" call. // 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 +// *GoogleCloudAiplatformV1SearchNearestEntitiesResponse.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 *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchNearestEntitiesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55197,7 +58732,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1SearchNearestEntitiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55210,90 +58745,62 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Do(opts . return ret, nil } -// 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + 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. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Wait(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { - c := &ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall{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 *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -55301,18 +58808,18 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.setIamPolicy" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55331,7 +58838,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55344,74 +58851,79 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeatureGroupsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall struct { + s *Service + featureView string + googlecloudaiplatformv1syncfeatureviewrequest *GoogleCloudAiplatformV1SyncFeatureViewRequest + 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`. +// Sync: Triggers on-demand sync for the FeatureView. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeatureGroupsOperationsService) Delete(name string) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { - c := &ProjectsLocationsFeatureGroupsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - featureView: Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Sync(featureView string, googlecloudaiplatformv1syncfeatureviewrequest *GoogleCloudAiplatformV1SyncFeatureViewRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featureView = featureView + c.googlecloudaiplatformv1syncfeatureviewrequest = googlecloudaiplatformv1syncfeatureviewrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1syncfeatureviewrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:sync") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "featureView": c.featureView, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.sync" call. // 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 *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1SyncFeatureViewResponse.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SyncFeatureViewResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55430,7 +58942,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1SyncFeatureViewResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55443,85 +58955,87 @@ func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsFeatureGroupsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + 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. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeatureGroupsOperationsService) Get(name string) *ProjectsLocationsFeatureGroupsOperationsGetCall { - c := &ProjectsLocationsFeatureGroupsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) TestIamPermissions(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// Permissions sets the optional parameter "permissions": The set of +// permissions to check for the `resource`. Permissions with wildcards (such as +// `*` or `storage.*`) are not allowed. For more information see IAM Overview +// (https://cloud.google.com/iam/docs/overview#permissions). +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.operations.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.testIamPermissions" call. // 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 +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsFeatureGroupsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55540,7 +59054,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55553,7 +59067,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsFeatureGroupsOperationsListWaitCall struct { +type ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -55562,40 +59076,21 @@ type ProjectsLocationsFeatureGroupsOperationsListWaitCall struct { header_ http.Header } -// ListWait: Lists operations that match the specified filter in the request. -// If the server doesn't support this method, it returns `UNIMPLEMENTED`. +// Get: Gets details of a single FeatureViewSync. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeatureGroupsOperationsService) ListWait(name string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { - c := &ProjectsLocationsFeatureGroupsOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the FeatureViewSync resource. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall{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 // details. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -55603,27 +59098,27 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Fields(s ...googl // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -55631,7 +59126,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) doRequest(alt str var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -55644,13 +59139,13 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.operations.listWait" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.featureViewSyncs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1FeatureViewSync.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 *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureViewSync, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55669,7 +59164,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1FeatureViewSync{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55682,109 +59177,124 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Do(opts ...google return ret, nil } -// 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 *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } +type ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsFeatureGroupsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// List: Lists FeatureViewSyncs in a given FeatureView. +// +// - parent: The resource name of the FeatureView to list FeatureViewSyncs. +// Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsService) List(parent string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c } -// 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 *ProjectsLocationsFeatureGroupsOperationsService) Wait(name string) *ProjectsLocationsFeatureGroupsOperationsWaitCall { - c := &ProjectsLocationsFeatureGroupsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// Filter sets the optional parameter "filter": Lists the FeatureViewSyncs that +// match the filter expression. The following filters are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. +// Values must be in RFC 3339 format. Examples: * `create_time > +// \"2020-01-31T15:30:00.000000Z\" --> FeatureViewSyncs created after +// 2020-01-31T15:30:00.000000Z. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.urlParams_.Set("filter", filter) 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 *ProjectsLocationsFeatureGroupsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureGroupsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `create_time` +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// FeatureViewSyncs to return. The service may return fewer than this value. If +// unspecified, at most 1000 FeatureViewSyncs will be returned. The maximum +// value is 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeatureOnlineStoreAdminService.ListFeatureViewSyncs call. +// Provide this to retrieve the subsequent page. When paginating, all other +// parameters provided to FeatureOnlineStoreAdminService.ListFeatureViewSyncs +// must match the call that provided the page token. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + 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 // details. -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViewSyncs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.featureViewSyncs.list" call. // 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 +// *GoogleCloudAiplatformV1ListFeatureViewSyncsResponse.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 *ProjectsLocationsFeatureGroupsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureViewSyncsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55803,7 +59313,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListFeatureViewSyncsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55816,89 +59326,95 @@ func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsFeatureOnlineStoresCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureViewSyncsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Create: Creates a new FeatureOnlineStore in a given project and location. -// -// - parent: The resource name of the Location to create FeatureOnlineStores. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeatureOnlineStoresService) Create(parent string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresCreateCall { - c := &ProjectsLocationsFeatureOnlineStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1featureonlinestore = googlecloudaiplatformv1featureonlinestore - return c +type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FeatureOnlineStoreId sets the optional parameter "featureOnlineStoreId": -// Required. The ID to use for this FeatureOnlineStore, which will become the -// final component of the FeatureOnlineStore's resource name. This value may be -// up to 60 characters, and valid characters are `[a-z0-9_]`. The first -// character cannot be a number. The value must be unique within the project -// and location. -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) FeatureOnlineStoreId(featureOnlineStoreId string) *ProjectsLocationsFeatureOnlineStoresCreateCall { - c.urlParams_.Set("featureOnlineStoreId", featureOnlineStoreId) +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureonlinestore) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureOnlineStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } 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.featureOnlineStores.create" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.delete" call. // 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 *ProjectsLocationsFeatureOnlineStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55917,7 +59433,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Do(opts ...googleapi.Ca 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, @@ -55930,65 +59446,68 @@ func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsFeatureOnlineStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not -// contain any FeatureViews. +// 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 FeatureOnlineStore to be deleted. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}`. -func (r *ProjectsLocationsFeatureOnlineStoresService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresDeleteCall { - c := &ProjectsLocationsFeatureOnlineStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any FeatureViews -// and Features for this FeatureOnlineStore will also be deleted. (Otherwise, -// the request will only work if the FeatureOnlineStore has no FeatureViews.) -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Force(force bool) *ProjectsLocationsFeatureOnlineStoresDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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 } @@ -55999,13 +59518,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.get" call. // 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 *ProjectsLocationsFeatureOnlineStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56037,7 +59556,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsFeatureOnlineStoresGetCall struct { +type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -56046,19 +59565,40 @@ type ProjectsLocationsFeatureOnlineStoresGetCall struct { header_ http.Header } -// Get: Gets details of a single FeatureOnlineStore. +// ListWait: 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 FeatureOnlineStore resource. -func (r *ProjectsLocationsFeatureOnlineStoresService) Get(name string) *ProjectsLocationsFeatureOnlineStoresGetCall { - c := &ProjectsLocationsFeatureOnlineStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) ListWait(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { + 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 // details. -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -56066,27 +59606,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -56094,7 +59634,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -56107,13 +59647,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.listWait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FeatureOnlineStore.ServerResponse.Header or (if a +// *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 *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureOnlineStore, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56132,7 +59672,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FeatureOnlineStore{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56145,72 +59685,90 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall struct { +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// 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. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsFeatureOnlineStoresService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { - c := &ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Wait(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no -// conditional role bindings may specify any valid value or leave the field -// unset. The policy in the response might use the policy version that you -// specified, or it might use a lower policy version. For example, if you -// specify version 3, but the policy has no conditional role bindings, the -// response uses version 1. To learn which resources support conditions in -// their IAM policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -56218,171 +59776,117 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) doRequest(alt str } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } - -// Do executes the "aiplatform.projects.locations.featureOnlineStores.getIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ - 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 -} - -type ProjectsLocationsFeatureOnlineStoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists FeatureOnlineStores in a given project and location. -// -// - parent: The resource name of the Location to list FeatureOnlineStores. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeatureOnlineStoresService) List(parent string) *ProjectsLocationsFeatureOnlineStoresListCall { - c := &ProjectsLocationsFeatureOnlineStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the FeatureOnlineStores -// that match the filter expression. The following fields are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. -// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, -// `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * -// `labels`: Supports key-value equality and key presence. Examples: * -// `create_time > "2020-01-01" OR update_time > "2020-01-01" -// FeatureOnlineStores created or updated after 2020-01-01. * `labels.env = -// "prod" FeatureOnlineStores with label "env" set to "prod". -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported Fields: * `create_time` * `update_time` -func (c *ProjectsLocationsFeatureOnlineStoresListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresListCall { - c.urlParams_.Set("orderBy", orderBy) - return c + +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.wait" call. +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) 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 } -// PageSize sets the optional parameter "pageSize": The maximum number of -// FeatureOnlineStores to return. The service may return fewer than this value. -// If unspecified, at most 100 FeatureOnlineStores will be returned. The -// maximum value is 100; any value greater than 100 will be coerced to 100. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeatureOnlineStoreAdminService.ListFeatureOnlineStores call. -// Provide this to retrieve the subsequent page. When paginating, all other -// parameters provided to -// FeatureOnlineStoreAdminService.ListFeatureOnlineStores must match the call -// that provided the page token. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *ProjectsLocationsFeatureOnlineStoresOperationsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { + c := &ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresListCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresListCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/featureOnlineStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } 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.featureOnlineStores.list" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse.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 *ProjectsLocationsFeatureOnlineStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse, error) { +// *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 *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56401,7 +59905,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56414,97 +59918,68 @@ func (c *ProjectsLocationsFeatureOnlineStoresListCall) Do(opts ...googleapi.Call return ret, nil } -// 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 *ProjectsLocationsFeatureOnlineStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsFeatureOnlineStoresPatchCall struct { - s *Service - name string - googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single FeatureOnlineStore. +// 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: Identifier. Name of the FeatureOnlineStore. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline -// Store}`. -func (r *ProjectsLocationsFeatureOnlineStoresService) Patch(name string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresPatchCall { - c := &ProjectsLocationsFeatureOnlineStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { + c := &ProjectsLocationsFeatureOnlineStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1featureonlinestore = googlecloudaiplatformv1featureonlinestore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the FeatureOnlineStore resource by -// the update. The fields specified in the update_mask are relative to the -// resource, not the full request. A field will be overwritten if it is in the -// mask. If the user does not provide a mask then only the non-empty fields -// present in the request will be overwritten. Set the update_mask to `*` to -// override all fields. Updatable fields: * `labels` * `description` * -// `bigtable` * `bigtable.auto_scaling` * -// `bigtable.enable_multi_region_replica` -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureonlinestore) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -56515,13 +59990,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.patch" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.get" call. // 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 *ProjectsLocationsFeatureOnlineStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56553,81 +60028,104 @@ func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +// ListWait: Lists operations that match the specified filter in the request. +// If the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsFeatureOnlineStoresService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { - c := &ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) ListWait(name string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c := &ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + 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 // details. -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.listWait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56646,7 +60144,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56659,68 +60157,90 @@ func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Do(opts ...google return ret, nil } -type ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall struct { +// 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 *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsFeatureOnlineStoresOperationsWaitCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// 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. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsFeatureOnlineStoresService) TestIamPermissions(resource string) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { - c := &ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Wait(name string) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { + c := &ProjectsLocationsFeatureOnlineStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Permissions sets the optional parameter "permissions": The set of -// permissions to check for the `resource`. Permissions with wildcards (such as -// `*` or `storage.*`) are not allowed. For more information see IAM Overview -// (https://cloud.google.com/iam/docs/overview#permissions). -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// 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 *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -56728,18 +60248,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) doRequest(a } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56758,7 +60278,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56771,79 +60291,64 @@ func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall struct { + s *Service + featurestore string + googlecloudaiplatformv1batchreadfeaturevaluesrequest *GoogleCloudAiplatformV1BatchReadFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new FeatureView in a given FeatureOnlineStore. +// BatchReadFeatureValues: Batch reads Feature values from a Featurestore. This +// API enables batch reading Feature values, where each read instance in the +// batch may read Feature values of entities from one or more EntityTypes. +// Point-in-time correctness is guaranteed for Feature values of each read +// instance as of each instance's read timestamp. // -// - parent: The resource name of the FeatureOnlineStore to create -// FeatureViews. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Create(parent string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1featureview = googlecloudaiplatformv1featureview - return c -} - -// FeatureViewId sets the optional parameter "featureViewId": Required. The ID -// to use for the FeatureView, which will become the final component of the -// FeatureView's resource name. This value may be up to 60 characters, and -// valid characters are `[a-z0-9_]`. The first character cannot be a number. -// The value must be unique within a FeatureOnlineStore. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) FeatureViewId(featureViewId string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { - c.urlParams_.Set("featureViewId", featureViewId) - return c -} - -// RunSyncImmediately sets the optional parameter "runSyncImmediately": -// Immutable. If set to true, one on demand sync will be run immediately, -// regardless whether the FeatureView.sync_config is configured or not. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) RunSyncImmediately(runSyncImmediately bool) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { - c.urlParams_.Set("runSyncImmediately", fmt.Sprint(runSyncImmediately)) +// - featurestore: The resource name of the Featurestore from which to query +// Feature values. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresService) BatchReadFeatureValues(featurestore string, googlecloudaiplatformv1batchreadfeaturevaluesrequest *GoogleCloudAiplatformV1BatchReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featurestore = featurestore + c.googlecloudaiplatformv1batchreadfeaturevaluesrequest = googlecloudaiplatformv1batchreadfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureview) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchreadfeaturevaluesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViews") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featurestore}:batchReadFeatureValues") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -56851,18 +60356,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) doRequest(a } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "featurestore": c.featurestore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.create" call. +// Do executes the "aiplatform.projects.locations.featurestores.batchReadFeatureValues" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56894,73 +60399,88 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single FeatureView. +// Create: Creates a new Featurestore in a given project and location. // -// - name: The name of the FeatureView to be deleted. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create Featurestores. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeaturestoresService) Create(parent string, googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore) *ProjectsLocationsFeaturestoresCreateCall { + c := &ProjectsLocationsFeaturestoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1featurestore = googlecloudaiplatformv1featurestore + return c +} + +// FeaturestoreId sets the optional parameter "featurestoreId": Required. The +// ID to use for this Featurestore, which will become the final component of +// the Featurestore's resource name. This value may be up to 60 characters, and +// valid characters are `[a-z0-9_]`. The first character cannot be a number. +// The value must be unique within the project and location. +func (c *ProjectsLocationsFeaturestoresCreateCall) FeaturestoreId(featurestoreId string) *ProjectsLocationsFeaturestoresCreateCall { + c.urlParams_.Set("featurestoreId", featurestoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { +func (c *ProjectsLocationsFeaturestoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { +func (c *ProjectsLocationsFeaturestoresCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featurestore) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featurestores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.create" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56992,79 +60512,81 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall struct { - s *Service - featureView string - googlecloudaiplatformv1fetchfeaturevaluesrequest *GoogleCloudAiplatformV1FetchFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FetchFeatureValues: Fetch feature values under a FeatureView. +// Delete: Deletes a single Featurestore. The Featurestore must not contain any +// EntityTypes or `force` must be set to true for the request to succeed. // -// - featureView: FeatureView resource format -// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline -// Store}/featureViews/{featureView}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) FetchFeatureValues(featureView string, googlecloudaiplatformv1fetchfeaturevaluesrequest *GoogleCloudAiplatformV1FetchFeatureValuesRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.featureView = featureView - c.googlecloudaiplatformv1fetchfeaturevaluesrequest = googlecloudaiplatformv1fetchfeaturevaluesrequest +// - name: The name of the Featurestore to be deleted. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresService) Delete(name string) *ProjectsLocationsFeaturestoresDeleteCall { + c := &ProjectsLocationsFeaturestoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, any EntityTypes +// and Features for this Featurestore will also be deleted. (Otherwise, the +// request will only work if the Featurestore has no EntityTypes.) +func (c *ProjectsLocationsFeaturestoresDeleteCall) Force(force bool) *ProjectsLocationsFeaturestoresDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchfeaturevaluesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:fetchFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "featureView": c.featureView, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.fetchFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FetchFeatureValuesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FetchFeatureValuesResponse, error) { +func (c *ProjectsLocationsFeaturestoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57083,7 +60605,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FetchFeatureValuesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57096,7 +60618,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall struct { +type ProjectsLocationsFeaturestoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -57105,13 +60627,11 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall struct { header_ http.Header } -// Get: Gets details of a single FeatureView. +// Get: Gets details of a single Featurestore. // -// - name: The name of the FeatureView resource. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Featurestore resource. +func (r *ProjectsLocationsFeaturestoresService) Get(name string) *ProjectsLocationsFeaturestoresGetCall { + c := &ProjectsLocationsFeaturestoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -57119,7 +60639,7 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { +func (c *ProjectsLocationsFeaturestoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -57127,27 +60647,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Fields(s ...go // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { +func (c *ProjectsLocationsFeaturestoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { +func (c *ProjectsLocationsFeaturestoresGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -57168,13 +60688,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FeatureView.ServerResponse.Header or (if a response +// *GoogleCloudAiplatformV1Featurestore.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureView, error) { +func (c *ProjectsLocationsFeaturestoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Featurestore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57193,7 +60713,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FeatureView{ + ret := &GoogleCloudAiplatformV1Featurestore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57206,7 +60726,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall struct { +type ProjectsLocationsFeaturestoresGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -57220,8 +60740,8 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeaturestoresService) GetIamPolicy(resource string) *ProjectsLocationsFeaturestoresGetIamPolicyCall { + c := &ProjectsLocationsFeaturestoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -57238,7 +60758,7 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) GetIamPolicy(r // response uses version 1. To learn which resources support conditions in // their IAM policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturestoresGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -57246,27 +60766,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Optio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -57284,13 +60804,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57322,7 +60842,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Do(op return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall struct { +type ProjectsLocationsFeaturestoresListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -57331,66 +60851,70 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall struct { header_ http.Header } -// List: Lists FeatureViews in a given FeatureOnlineStore. +// List: Lists Featurestores in a given project and location. // -// - parent: The resource name of the FeatureOnlineStore to list FeatureViews. -// Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) List(parent string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to list Featurestores. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeaturestoresService) List(parent string) *ProjectsLocationsFeaturestoresListCall { + c := &ProjectsLocationsFeaturestoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Lists the FeatureViews that -// match the filter expression. The following filters are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. +// Filter sets the optional parameter "filter": Lists the featurestores that +// match the filter expression. The following fields are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. // Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, -// `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339 format. * -// `labels`: Supports key-value equality as well as key presence. Examples: * -// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > -// \"2020-01-31T15:30:00.000000Z\" --> FeatureViews created or updated after -// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` -// --> FeatureViews having both (active: yes) and (env: prod) labels. * -// `labels.env: *` --> Any FeatureView which has a label with 'env' as the key. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +// `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * +// `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`, +// `<=`, and `>=` comparisons. * `labels`: Supports key-value equality and key +// presence. Examples: * `create_time > "2020-01-01" OR update_time > +// "2020-01-01" Featurestores created or updated after 2020-01-01. * +// `labels.env = "prod" Featurestores with label "env" set to "prod". +func (c *ProjectsLocationsFeaturestoresListCall) Filter(filter string) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `feature_view_id` * `create_time` * -// `update_time` -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +// for descending. Supported Fields: * `create_time` * `update_time` * +// `online_serving_config.fixed_node_count` +func (c *ProjectsLocationsFeaturestoresListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// FeatureViews to return. The service may return fewer than this value. If -// unspecified, at most 1000 FeatureViews will be returned. The maximum value -// is 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +// Featurestores to return. The service may return fewer than this value. If +// unspecified, at most 100 Featurestores will be returned. The maximum value +// is 100; any value greater than 100 will be coerced to 100. +func (c *ProjectsLocationsFeaturestoresListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeatureOnlineStoreAdminService.ListFeatureViews call. -// Provide this to retrieve the subsequent page. When paginating, all other -// parameters provided to FeatureOnlineStoreAdminService.ListFeatureViews must -// match the call that provided the page token. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +// from a previous FeaturestoreService.ListFeaturestores call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to FeaturestoreService.ListFeaturestores must match the call that provided +// the page token. +func (c *ProjectsLocationsFeaturestoresListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsFeaturestoresListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +func (c *ProjectsLocationsFeaturestoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -57398,27 +60922,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Fields(s ...g // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +func (c *ProjectsLocationsFeaturestoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +func (c *ProjectsLocationsFeaturestoresListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -57426,7 +60950,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViews") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featurestores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -57439,13 +60963,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.list" call. +// Do executes the "aiplatform.projects.locations.featurestores.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeatureViewsResponse.ServerResponse.Header or +// *GoogleCloudAiplatformV1ListFeaturestoresResponse.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureViewsResponse, error) { +func (c *ProjectsLocationsFeaturestoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturestoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57464,7 +60988,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeatureViewsResponse{ + ret := &GoogleCloudAiplatformV1ListFeaturestoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57480,7 +61004,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Do(opts ...go // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureViewsResponse) error) error { +func (c *ProjectsLocationsFeaturestoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturestoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -57498,39 +61022,36 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Pages(ctx con } } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresPatchCall struct { + s *Service + name string + googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single FeatureView. +// Patch: Updates the parameters of a single Featurestore. // -// - name: Identifier. Name of the FeatureView. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Patch(name string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Name of the Featurestore. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresService) Patch(name string, googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore) *ProjectsLocationsFeaturestoresPatchCall { + c := &ProjectsLocationsFeaturestoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1featureview = googlecloudaiplatformv1featureview + c.googlecloudaiplatformv1featurestore = googlecloudaiplatformv1featurestore return c } // UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the FeatureView resource by the +// specify the fields to be overwritten in the Featurestore resource by the // update. The fields specified in the update_mask are relative to the // resource, not the full request. A field will be overwritten if it is in the // mask. If the user does not provide a mask then only the non-empty fields // present in the request will be overwritten. Set the update_mask to `*` to -// override all fields. Updatable fields: * `labels` * `service_agent_type` * -// `big_query_source` * `big_query_source.uri` * -// `big_query_source.entity_id_columns` * `feature_registry_source` * -// `feature_registry_source.feature_groups` * `sync_config` * -// `sync_config.cron` * `optimized_config.automatic_resources` -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { +// override all fields. Updatable fields: * `labels` * +// `online_serving_config.fixed_node_count` * `online_serving_config.scaling` * +// `online_storage_ttl_days` +func (c *ProjectsLocationsFeaturestoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -57538,30 +61059,30 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) UpdateMask(u // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { +func (c *ProjectsLocationsFeaturestoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { +func (c *ProjectsLocationsFeaturestoresPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureview) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featurestore) if err != nil { return nil, err } @@ -57580,13 +61101,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.patch" call. +// Do executes the "aiplatform.projects.locations.featurestores.patch" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57618,81 +61139,142 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...g return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall struct { - s *Service - featureView string - googlecloudaiplatformv1searchnearestentitiesrequest *GoogleCloudAiplatformV1SearchNearestEntitiesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresSearchFeaturesCall struct { + s *Service + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SearchNearestEntities: Search the nearest entities under a FeatureView. -// Search only works for indexable feature view; if a feature view isn't -// indexable, returns Invalid argument response. +// SearchFeatures: Searches Features matching a query in a given project. // -// - featureView: FeatureView resource format -// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline -// Store}/featureViews/{featureView}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SearchNearestEntities(featureView string, googlecloudaiplatformv1searchnearestentitiesrequest *GoogleCloudAiplatformV1SearchNearestEntitiesRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.featureView = featureView - c.googlecloudaiplatformv1searchnearestentitiesrequest = googlecloudaiplatformv1searchnearestentitiesrequest +// - location: The resource name of the Location to search Features. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeaturestoresService) SearchFeatures(location string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c := &ProjectsLocationsFeaturestoresSearchFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// Features to return. The service may return fewer than this value. If +// unspecified, at most 100 Features will be returned. The maximum value is +// 100; any value greater than 100 will be coerced to 100. +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeaturestoreService.SearchFeatures call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to FeaturestoreService.SearchFeatures, except `page_size`, must match the +// call that provided the page token. +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": Query string that is a +// conjunction of field-restricted queries and/or field-restricted filters. +// Field-restricted queries and filters can be combined using `AND` to form a +// conjunction. A field query is in the form FIELD:QUERY. This implicitly +// checks if QUERY exists as a substring within Feature's FIELD. The QUERY and +// the FIELD are converted to a sequence of words (i.e. tokens) for comparison. +// This is done by: * Removing leading/trailing whitespace and tokenizing the +// search value. Characters that are not one of alphanumeric `[a-zA-Z0-9]`, +// underscore `_`, or asterisk `*` are treated as delimiters for tokens. `*` is +// treated as a wildcard that matches characters within a token. * Ignoring +// case. * Prepending an asterisk to the first and appending an asterisk to the +// last token in QUERY. A QUERY must be either a singular token or a phrase. A +// phrase is one or multiple words enclosed in double quotation marks ("). With +// phrases, the order of the words is important. Words in the phrase must be +// matching in order and consecutively. Supported FIELDs for field-restricted +// queries: * `feature_id` * `description` * `entity_type_id` Examples: * +// `feature_id: foo` --> Matches a Feature with ID containing the substring +// `foo` (eg. `foo`, `foofeature`, `barfoo`). * `feature_id: foo*feature` --> +// Matches a Feature with ID containing the substring `foo*feature` (eg. +// `foobarfeature`). * `feature_id: foo AND description: bar` --> Matches a +// Feature with ID containing the substring `foo` and description containing +// the substring `bar`. Besides field queries, the following exact-match +// filters are supported. The exact-match filters do not support wildcards. +// Unlike field-restricted queries, exact-match filters are case-sensitive. * +// `feature_id`: Supports = comparisons. * `description`: Supports = +// comparisons. Multi-token filters should be enclosed in quotes. * +// `entity_type_id`: Supports = comparisons. * `value_type`: Supports = and != +// comparisons. * `labels`: Supports key-value equality as well as key +// presence. * `featurestore_id`: Supports = comparisons. Examples: * +// `description = "foo bar" --> Any Feature with description exactly equal to +// `foo bar` * `value_type = DOUBLE` --> Features whose type is DOUBLE. * +// `labels.active = yes AND labels.env = prod` --> Features having both +// (active: yes) and (env: prod) labels. * `labels.env: *` --> Any Feature +// which has a label with `env` as the key. +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Query(query string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c.urlParams_.Set("query", query) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresSearchFeaturesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresSearchFeaturesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchnearestentitiesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+featureView}:searchNearestEntities") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/featurestores:searchFeatures") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "featureView": c.featureView, + "location": c.location, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.searchNearestEntities" call. +// Do executes the "aiplatform.projects.locations.featurestores.searchFeatures" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchNearestEntitiesResponse.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 +// *GoogleCloudAiplatformV1SearchFeaturesResponse.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchNearestEntitiesResponse, error) { +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchFeaturesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57711,7 +61293,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchNearestEntitiesResponse{ + ret := &GoogleCloudAiplatformV1SearchFeaturesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57724,7 +61306,28 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCa return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall struct { +// 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 *ProjectsLocationsFeaturestoresSearchFeaturesCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchFeaturesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsFeaturestoresSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -57740,8 +61343,8 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeaturestoresService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeaturestoresSetIamPolicyCall { + c := &ProjectsLocationsFeaturestoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -57750,27 +61353,27 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SetIamPolicy(r // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) @@ -57792,13 +61395,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57830,60 +61433,68 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Do(op return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall struct { - s *Service - featureView string - googlecloudaiplatformv1syncfeatureviewrequest *GoogleCloudAiplatformV1SyncFeatureViewRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Sync: Triggers on-demand sync for the FeatureView. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - featureView: Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Sync(featureView string, googlecloudaiplatformv1syncfeatureviewrequest *GoogleCloudAiplatformV1SyncFeatureViewRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.featureView = featureView - c.googlecloudaiplatformv1syncfeatureviewrequest = googlecloudaiplatformv1syncfeatureviewrequest +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsFeaturestoresService) TestIamPermissions(resource string) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { + c := &ProjectsLocationsFeaturestoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// Permissions sets the optional parameter "permissions": The set of +// permissions to check for the `resource`. Permissions with wildcards (such as +// `*` or `storage.*`) are not allowed. For more information see IAM Overview +// (https://cloud.google.com/iam/docs/overview#permissions). +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1syncfeatureviewrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:sync") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -57891,18 +61502,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "featureView": c.featureView, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.sync" call. +// Do executes the "aiplatform.projects.locations.featurestores.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SyncFeatureViewResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SyncFeatureViewResponse, error) { +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57921,7 +61532,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SyncFeatureViewResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57934,68 +61545,70 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// Create: Creates a new EntityType in a given Featurestore. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) TestIamPermissions(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the Featurestore to create EntityTypes. +// Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) Create(parent string, googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { + c := &ProjectsLocationsFeaturestoresEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1entitytype = googlecloudaiplatformv1entitytype return c } -// Permissions sets the optional parameter "permissions": The set of -// permissions to check for the `resource`. Permissions with wildcards (such as -// `*` or `storage.*`) are not allowed. For more information see IAM Overview -// (https://cloud.google.com/iam/docs/overview#permissions). -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// EntityTypeId sets the optional parameter "entityTypeId": Required. The ID to +// use for the EntityType, which will become the final component of the +// EntityType's resource name. This value may be up to 60 characters, and valid +// characters are `[a-z0-9_]`. The first character cannot be a number. The +// value must be unique within a featurestore. +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) EntityTypeId(entityTypeId string) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { + c.urlParams_.Set("entityTypeId", entityTypeId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1entitytype) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entityTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -58003,18 +61616,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58033,7 +61646,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58046,68 +61659,65 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single FeatureViewSync. +// Delete: Deletes a single EntityType. The EntityType must not have any +// Features or `force` must be set to true for the request to succeed. // -// - name: The name of the FeatureViewSync resource. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the EntityType to be deleted. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { + c := &ProjectsLocationsFeaturestoresEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Force sets the optional parameter "force": If set to true, any Features for +// this EntityType will also be deleted. (Otherwise, the request will only work +// if the EntityType has no Features.) +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Force(force bool) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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 } @@ -58118,13 +61728,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.featureViewSyncs.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FeatureViewSync.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureViewSync, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58143,7 +61753,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FeatureViewSync{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58156,124 +61766,87 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1deletefeaturevaluesrequest *GoogleCloudAiplatformV1DeleteFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists FeatureViewSyncs in a given FeatureView. +// DeleteFeatureValues: Delete Feature values from Featurestore. The progress +// of the deletion is tracked by the returned operation. The deleted feature +// values are guaranteed to be invisible to subsequent read operations after +// the operation is marked as successfully done. If a delete feature values +// operation fails, the feature values returned from reads and exports may be +// inconsistent. If consistency is required, the caller must retry the same +// delete request again and wait till the new operation returned is marked as +// successfully done. // -// - parent: The resource name of the FeatureView to list FeatureViewSyncs. -// Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsService) List(parent string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the FeatureViewSyncs that -// match the filter expression. The following filters are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. -// Values must be in RFC 3339 format. Examples: * `create_time > -// \"2020-01-31T15:30:00.000000Z\" --> FeatureViewSyncs created after -// 2020-01-31T15:30:00.000000Z. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `create_time` -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// FeatureViewSyncs to return. The service may return fewer than this value. If -// unspecified, at most 1000 FeatureViewSyncs will be returned. The maximum -// value is 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeatureOnlineStoreAdminService.ListFeatureViewSyncs call. -// Provide this to retrieve the subsequent page. When paginating, all other -// parameters provided to FeatureOnlineStoreAdminService.ListFeatureViewSyncs -// must match the call that provided the page token. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - entityType: The resource name of the EntityType grouping the Features for +// which values are being deleted from. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entityType}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) DeleteFeatureValues(entityType string, googlecloudaiplatformv1deletefeaturevaluesrequest *GoogleCloudAiplatformV1DeleteFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1deletefeaturevaluesrequest = googlecloudaiplatformv1deletefeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deletefeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViewSyncs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:deleteFeatureValues") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.featureViewSyncs.list" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.deleteFeatureValues" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeatureViewSyncsResponse.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 +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureViewSyncsResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58292,7 +61865,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeatureViewSyncsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58305,95 +61878,81 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCal return ret, nil } -// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureViewSyncsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1exportfeaturevaluesrequest *GoogleCloudAiplatformV1ExportFeatureValuesRequest + 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`. +// ExportFeatureValues: Exports Feature values from all the entities of a +// target EntityType. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - entityType: The resource name of the EntityType from which to export +// Feature values. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) ExportFeatureValues(entityType string, googlecloudaiplatformv1exportfeaturevaluesrequest *GoogleCloudAiplatformV1ExportFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1exportfeaturevaluesrequest = googlecloudaiplatformv1exportfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportfeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:exportFeatureValues") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.exportFeatureValues" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58412,7 +61971,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) D 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, @@ -58425,7 +61984,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) D return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall struct { +type ProjectsLocationsFeaturestoresEntityTypesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -58434,13 +61993,13 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall struct { 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. +// Get: Gets details of a single EntityType. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the EntityType resource. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesGetCall { + c := &ProjectsLocationsFeaturestoresEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -58448,7 +62007,7 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Get( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -58456,27 +62015,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Fiel // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -58497,13 +62056,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.get" call. // 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 +// *GoogleCloudAiplatformV1EntityType.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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EntityType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58522,7 +62081,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1EntityType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58535,104 +62094,91 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Do(o return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListWait: Lists operations that match the specified filter in the request. -// If the server doesn't support this method, it returns `UNIMPLEMENTED`. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) ListWait(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) GetIamPolicy(resource string) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { + c := &ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c.urlParams_.Set("pageToken", pageToken) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.listWait" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.getIamPolicy" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58651,7 +62197,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58664,90 +62210,74 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) return ret, nil } -// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1importfeaturevaluesrequest *GoogleCloudAiplatformV1ImportFeatureValuesRequest + 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. +// ImportFeatureValues: Imports Feature values into the Featurestore from a +// source storage. The progress of the import is tracked by the returned +// operation. The imported features are guaranteed to be visible to subsequent +// read operations after the operation is marked as successfully done. If an +// import operation fails, the Feature values returned from reads and exports +// may be inconsistent. If consistency is required, the caller must retry the +// same import request again and wait till the new operation returned is marked +// as successfully done. There are also scenarios where the caller can cause +// inconsistency. - Source data for import contains multiple distinct Feature +// values for the same entity ID and timestamp. - Source is modified during an +// import. This includes adding, updating, or removing source data and/or +// metadata. Examples of updating metadata include but are not limited to +// changing storage location, storage class, or retention policy. - Online +// serving cluster is under-provisioned. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Wait(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall{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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - entityType: The resource name of the EntityType grouping the Features for +// which values are being imported. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entityType}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) ImportFeatureValues(entityType string, googlecloudaiplatformv1importfeaturevaluesrequest *GoogleCloudAiplatformV1ImportFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1importfeaturevaluesrequest = googlecloudaiplatformv1importfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importfeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:importFeatureValues") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -58755,18 +62285,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) doR } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.importFeatureValues" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58798,74 +62328,135 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Do( return ret, nil } -type ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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`. +// List: Lists EntityTypes in a given Featurestore. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { - c := &ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Featurestore to list EntityTypes. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c := &ProjectsLocationsFeaturestoresEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the EntityTypes that +// match the filter expression. The following filters are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. +// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, +// `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339 format. * +// `labels`: Supports key-value equality as well as key presence. Examples: * +// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > +// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after +// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` +// --> EntityTypes having both (active: yes) and (env: prod) labels. * +// `labels.env: *` --> Any EntityType which has a label with 'env' as the key. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `entity_type_id` * `create_time` * +// `update_time` +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// EntityTypes to return. The service may return fewer than this value. If +// unspecified, at most 1000 EntityTypes will be returned. The maximum value is +// 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeaturestoreService.ListEntityTypes call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to FeaturestoreService.ListEntityTypes must match the call that provided the +// page token. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entityTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.list" call. // 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 *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListEntityTypesResponse.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 *ProjectsLocationsFeaturestoresEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListEntityTypesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58884,7 +62475,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListEntityTypesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58897,68 +62488,106 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeatureOnlineStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsFeaturestoresEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListEntityTypesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// 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. +type ProjectsLocationsFeaturestoresEntityTypesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single EntityType. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { - c := &ProjectsLocationsFeatureOnlineStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Name of the EntityType. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` The last part entity_type is assigned by the client. +// The entity_type can be up to 64 characters long and can consist only of +// ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 +// starting with a letter. The value will be unique given a featurestore. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) Patch(name string, googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { + c := &ProjectsLocationsFeaturestoresEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1entitytype = googlecloudaiplatformv1entitytype + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the EntityType resource by the +// update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then only the non-empty fields +// present in the request will be overwritten. Set the update_mask to `*` to +// override all fields. Updatable fields: * `description` * `labels` * +// `monitoring_config.snapshot_analysis.disabled` * +// `monitoring_config.snapshot_analysis.monitoring_interval_days` * +// `monitoring_config.snapshot_analysis.staleness_days` * +// `monitoring_config.import_features_analysis.state` * +// `monitoring_config.import_features_analysis.anomaly_detection_baseline` * +// `monitoring_config.numerical_threshold_config.value` * +// `monitoring_config.categorical_threshold_config.value` * +// `offline_storage_ttl_days` +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1entitytype) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -58969,13 +62598,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.patch" call. // 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 +// *GoogleCloudAiplatformV1EntityType.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 *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EntityType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58991,120 +62620,99 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Do(opts ...googl 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 -} - -type ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListWait: 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 *ProjectsLocationsFeatureOnlineStoresOperationsService) ListWait(name string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c := &ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c.urlParams_.Set("filter", filter) - return c + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudAiplatformV1EntityType{ + 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 } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1readfeaturevaluesrequest *GoogleCloudAiplatformV1ReadFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c.urlParams_.Set("pageToken", pageToken) +// ReadFeatureValues: Reads Feature values of a specific entity of an +// EntityType. For reading feature values of multiple entities of an +// EntityType, please use StreamingReadFeatureValues. +// +// - entityType: The resource name of the EntityType for the entity being read. +// Value format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entityType}`. For example, for a machine learning model predicting +// user clicks on a website, an EntityType ID could be `user`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) ReadFeatureValues(entityType string, googlecloudaiplatformv1readfeaturevaluesrequest *GoogleCloudAiplatformV1ReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1readfeaturevaluesrequest = googlecloudaiplatformv1readfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1readfeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:readFeatureValues") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.listWait" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.readFeatureValues" call. // 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 +// *GoogleCloudAiplatformV1ReadFeatureValuesResponse.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 *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadFeatureValuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59123,7 +62731,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ReadFeatureValuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59136,90 +62744,62 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Do(opts ... return ret, nil } -// 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 *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsFeatureOnlineStoresOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + 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. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Wait(name string) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { - c := &ProjectsLocationsFeatureOnlineStoresOperationsWaitCall{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 *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { + c := &ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -59227,18 +62807,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) doRequest(alt s } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.setIamPolicy" call. // 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 *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59257,7 +62837,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59270,64 +62850,63 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall struct { - s *Service - featurestore string - googlecloudaiplatformv1batchreadfeaturevaluesrequest *GoogleCloudAiplatformV1BatchReadFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1streamingreadfeaturevaluesrequest *GoogleCloudAiplatformV1StreamingReadFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchReadFeatureValues: Batch reads Feature values from a Featurestore. This -// API enables batch reading Feature values, where each read instance in the -// batch may read Feature values of entities from one or more EntityTypes. -// Point-in-time correctness is guaranteed for Feature values of each read -// instance as of each instance's read timestamp. +// StreamingReadFeatureValues: Reads Feature values for multiple entities. +// Depending on their size, data for different entities may be broken up across +// multiple responses. // -// - featurestore: The resource name of the Featurestore from which to query -// Feature values. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresService) BatchReadFeatureValues(featurestore string, googlecloudaiplatformv1batchreadfeaturevaluesrequest *GoogleCloudAiplatformV1BatchReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.featurestore = featurestore - c.googlecloudaiplatformv1batchreadfeaturevaluesrequest = googlecloudaiplatformv1batchreadfeaturevaluesrequest +// - entityType: The resource name of the entities' type. Value format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entityType}`. For example, for a machine learning model predicting +// user clicks on a website, an EntityType ID could be `user`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) StreamingReadFeatureValues(entityType string, googlecloudaiplatformv1streamingreadfeaturevaluesrequest *GoogleCloudAiplatformV1StreamingReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1streamingreadfeaturevaluesrequest = googlecloudaiplatformv1streamingreadfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchreadfeaturevaluesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingreadfeaturevaluesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featurestore}:batchReadFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:streamingReadFeatureValues") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -59335,18 +62914,18 @@ func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "featurestore": c.featurestore, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.batchReadFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.streamingReadFeatureValues" call. // 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 +// *GoogleCloudAiplatformV1ReadFeatureValuesResponse.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 *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadFeatureValuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59365,7 +62944,7 @@ func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ReadFeatureValuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59378,69 +62957,68 @@ func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeaturestoresCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Featurestore in a given project and location. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - parent: The resource name of the Location to create Featurestores. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeaturestoresService) Create(parent string, googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore) *ProjectsLocationsFeaturestoresCreateCall { - c := &ProjectsLocationsFeaturestoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1featurestore = googlecloudaiplatformv1featurestore +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) TestIamPermissions(resource string) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { + c := &ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// FeaturestoreId sets the optional parameter "featurestoreId": Required. The -// ID to use for this Featurestore, which will become the final component of -// the Featurestore's resource name. This value may be up to 60 characters, and -// valid characters are `[a-z0-9_]`. The first character cannot be a number. -// The value must be unique within the project and location. -func (c *ProjectsLocationsFeaturestoresCreateCall) FeaturestoreId(featurestoreId string) *ProjectsLocationsFeaturestoresCreateCall { - c.urlParams_.Set("featurestoreId", featurestoreId) +// Permissions sets the optional parameter "permissions": The set of +// permissions to check for the `resource`. Permissions with wildcards (such as +// `*` or `storage.*`) are not allowed. For more information see IAM Overview +// (https://cloud.google.com/iam/docs/overview#permissions). +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresCreateCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresCreateCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featurestore) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featurestores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -59448,18 +63026,18 @@ func (c *ProjectsLocationsFeaturestoresCreateCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.create" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.testIamPermissions" call. // 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 +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsFeaturestoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59478,7 +63056,7 @@ func (c *ProjectsLocationsFeaturestoresCreateCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59491,81 +63069,85 @@ func (c *ProjectsLocationsFeaturestoresCreateCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsFeaturestoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1writefeaturevaluesrequest *GoogleCloudAiplatformV1WriteFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single Featurestore. The Featurestore must not contain any -// EntityTypes or `force` must be set to true for the request to succeed. +// WriteFeatureValues: Writes Feature values of one or more entities of an +// EntityType. The Feature values are merged into existing entities if any. The +// Feature values to be written must have timestamp within the online storage +// retention. // -// - name: The name of the Featurestore to be deleted. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresService) Delete(name string) *ProjectsLocationsFeaturestoresDeleteCall { - c := &ProjectsLocationsFeaturestoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Force sets the optional parameter "force": If set to true, any EntityTypes -// and Features for this Featurestore will also be deleted. (Otherwise, the -// request will only work if the Featurestore has no EntityTypes.) -func (c *ProjectsLocationsFeaturestoresDeleteCall) Force(force bool) *ProjectsLocationsFeaturestoresDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) +// - entityType: The resource name of the EntityType for the entities being +// written. Value format: +// `projects/{project}/locations/{location}/featurestores/ +// {featurestore}/entityTypes/{entityType}`. For example, for a machine +// learning model predicting user clicks on a website, an EntityType ID could +// be `user`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) WriteFeatureValues(entityType string, googlecloudaiplatformv1writefeaturevaluesrequest *GoogleCloudAiplatformV1WriteFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1writefeaturevaluesrequest = googlecloudaiplatformv1writefeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1writefeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:writeFeatureValues") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.writeFeatureValues" call. // 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 +// *GoogleCloudAiplatformV1WriteFeatureValuesResponse.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 *ProjectsLocationsFeaturestoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1WriteFeatureValuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59584,7 +63166,7 @@ func (c *ProjectsLocationsFeaturestoresDeleteCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1WriteFeatureValuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59597,83 +63179,81 @@ func (c *ProjectsLocationsFeaturestoresDeleteCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsFeaturestoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single Featurestore. +// BatchCreate: Creates a batch of Features in a given EntityType. // -// - name: The name of the Featurestore resource. -func (r *ProjectsLocationsFeaturestoresService) Get(name string) *ProjectsLocationsFeaturestoresGetCall { - c := &ProjectsLocationsFeaturestoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the EntityType/FeatureGroup to create the +// batch of Features under. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.batchCreate" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Featurestore.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Featurestore, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59692,7 +63272,7 @@ func (c *ProjectsLocationsFeaturestoresGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Featurestore{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59705,72 +63285,72 @@ func (c *ProjectsLocationsFeaturestoresGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsFeaturestoresGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Create: Creates a new Feature in a given EntityType. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsFeaturestoresService) GetIamPolicy(resource string) *ProjectsLocationsFeaturestoresGetIamPolicyCall { - c := &ProjectsLocationsFeaturestoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the EntityType or FeatureGroup to create a +// Feature. Format for entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no -// conditional role bindings may specify any valid value or leave the field -// unset. The policy in the response might use the policy version that you -// specified, or it might use a lower policy version. For example, if you -// specify version 3, but the policy has no conditional role bindings, the -// response uses version 1. To learn which resources support conditions in -// their IAM policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturestoresGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// FeatureId sets the optional parameter "featureId": Required. The ID to use +// for the Feature, which will become the final component of the Feature's +// resource name. This value may be up to 128 characters, and valid characters +// are `[a-z0-9_]`. The first character cannot be a number. The value must be +// unique within an EntityType/FeatureGroup. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { + c.urlParams_.Set("featureId", featureId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -59778,18 +63358,18 @@ func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsFeaturestoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59808,7 +63388,7 @@ func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59821,134 +63401,75 @@ func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsFeaturestoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Featurestores in a given project and location. +// Delete: Deletes a single Feature. // -// - parent: The resource name of the Location to list Featurestores. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeaturestoresService) List(parent string) *ProjectsLocationsFeaturestoresListCall { - c := &ProjectsLocationsFeaturestoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the featurestores that -// match the filter expression. The following fields are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. -// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, -// `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * -// `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`, -// `<=`, and `>=` comparisons. * `labels`: Supports key-value equality and key -// presence. Examples: * `create_time > "2020-01-01" OR update_time > -// "2020-01-01" Featurestores created or updated after 2020-01-01. * -// `labels.env = "prod" Featurestores with label "env" set to "prod". -func (c *ProjectsLocationsFeaturestoresListCall) Filter(filter string) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported Fields: * `create_time` * `update_time` * -// `online_serving_config.fixed_node_count` -func (c *ProjectsLocationsFeaturestoresListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Featurestores to return. The service may return fewer than this value. If -// unspecified, at most 100 Featurestores will be returned. The maximum value -// is 100; any value greater than 100 will be coerced to 100. -func (c *ProjectsLocationsFeaturestoresListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.ListFeaturestores call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.ListFeaturestores must match the call that provided -// the page token. -func (c *ProjectsLocationsFeaturestoresListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsFeaturestoresListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the Features to be deleted. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}/features/{feature}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat +// ures/{feature}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall{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 // details. -func (c *ProjectsLocationsFeaturestoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresListCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/featurestores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } 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.featurestores.list" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeaturestoresResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturestoresResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59967,7 +63488,7 @@ func (c *ProjectsLocationsFeaturestoresListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeaturestoresResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59980,96 +63501,69 @@ func (c *ProjectsLocationsFeaturestoresListCall) Do(opts ...googleapi.CallOption return ret, nil } -// 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 *ProjectsLocationsFeaturestoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturestoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsFeaturestoresPatchCall struct { - s *Service - name string - googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single Featurestore. +// Get: Gets details of a single Feature. // -// - name: Output only. Name of the Featurestore. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresService) Patch(name string, googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore) *ProjectsLocationsFeaturestoresPatchCall { - c := &ProjectsLocationsFeaturestoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Feature resource. Format for entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1featurestore = googlecloudaiplatformv1featurestore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Featurestore resource by the -// update. The fields specified in the update_mask are relative to the -// resource, not the full request. A field will be overwritten if it is in the -// mask. If the user does not provide a mask then only the non-empty fields -// present in the request will be overwritten. Set the update_mask to `*` to -// override all fields. Updatable fields: * `labels` * -// `online_serving_config.fixed_node_count` * `online_serving_config.scaling` * -// `online_storage_ttl_days` -func (c *ProjectsLocationsFeaturestoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresPatchCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresPatchCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featurestore) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -60080,13 +63574,13 @@ func (c *ProjectsLocationsFeaturestoresPatchCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.patch" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Feature.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 *ProjectsLocationsFeaturestoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60105,7 +63599,7 @@ func (c *ProjectsLocationsFeaturestoresPatchCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Feature{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60118,87 +63612,95 @@ func (c *ProjectsLocationsFeaturestoresPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsFeaturestoresSearchFeaturesCall struct { +type ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall struct { s *Service - location string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// SearchFeatures: Searches Features matching a query in a given project. +// List: Lists Features in a given EntityType. // -// - location: The resource name of the Location to search Features. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeaturestoresService) SearchFeatures(location string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { - c := &ProjectsLocationsFeaturestoresSearchFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location +// - parent: The resource name of the Location to list Features. Format for +// entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the Features that match +// the filter expression. The following filters are supported: * `value_type`: +// Supports = and != comparisons. * `create_time`: Supports =, !=, <, >, >=, +// and <= comparisons. Values must be in RFC 3339 format. * `update_time`: +// Supports =, !=, <, >, >=, and <= comparisons. Values must be in RFC 3339 +// format. * `labels`: Supports key-value equality as well as key presence. +// Examples: * `value_type = DOUBLE` --> Features whose type is DOUBLE. * +// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > +// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after +// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` +// --> Features having both (active: yes) and (env: prod) labels. * +// `labels.env: *` --> Any Feature which has a label with 'env' as the key. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LatestStatsCount sets the optional parameter "latestStatsCount": Only +// applicable for Vertex AI Feature Store (Legacy). If set, return the most +// recent ListFeaturesRequest.latest_stats_count of stats for each Feature in +// response. Valid value is [0, 10]. If number of stats exists < +// ListFeaturesRequest.latest_stats_count, return all existing stats. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) LatestStatsCount(latestStatsCount int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c.urlParams_.Set("latestStatsCount", fmt.Sprint(latestStatsCount)) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `feature_id` * `value_type` (Not +// supported for FeatureRegistry Feature) * `create_time` * `update_time` +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of // Features to return. The service may return fewer than this value. If -// unspecified, at most 100 Features will be returned. The maximum value is -// 100; any value greater than 100 will be coerced to 100. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +// unspecified, at most 1000 Features will be returned. The maximum value is +// 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.SearchFeatures call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.SearchFeatures, except `page_size`, must match the -// call that provided the page token. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +// from a previous FeaturestoreService.ListFeatures call or +// FeatureRegistryService.ListFeatures call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must +// match the call that provided the page token. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Query sets the optional parameter "query": Query string that is a -// conjunction of field-restricted queries and/or field-restricted filters. -// Field-restricted queries and filters can be combined using `AND` to form a -// conjunction. A field query is in the form FIELD:QUERY. This implicitly -// checks if QUERY exists as a substring within Feature's FIELD. The QUERY and -// the FIELD are converted to a sequence of words (i.e. tokens) for comparison. -// This is done by: * Removing leading/trailing whitespace and tokenizing the -// search value. Characters that are not one of alphanumeric `[a-zA-Z0-9]`, -// underscore `_`, or asterisk `*` are treated as delimiters for tokens. `*` is -// treated as a wildcard that matches characters within a token. * Ignoring -// case. * Prepending an asterisk to the first and appending an asterisk to the -// last token in QUERY. A QUERY must be either a singular token or a phrase. A -// phrase is one or multiple words enclosed in double quotation marks ("). With -// phrases, the order of the words is important. Words in the phrase must be -// matching in order and consecutively. Supported FIELDs for field-restricted -// queries: * `feature_id` * `description` * `entity_type_id` Examples: * -// `feature_id: foo` --> Matches a Feature with ID containing the substring -// `foo` (eg. `foo`, `foofeature`, `barfoo`). * `feature_id: foo*feature` --> -// Matches a Feature with ID containing the substring `foo*feature` (eg. -// `foobarfeature`). * `feature_id: foo AND description: bar` --> Matches a -// Feature with ID containing the substring `foo` and description containing -// the substring `bar`. Besides field queries, the following exact-match -// filters are supported. The exact-match filters do not support wildcards. -// Unlike field-restricted queries, exact-match filters are case-sensitive. * -// `feature_id`: Supports = comparisons. * `description`: Supports = -// comparisons. Multi-token filters should be enclosed in quotes. * -// `entity_type_id`: Supports = comparisons. * `value_type`: Supports = and != -// comparisons. * `labels`: Supports key-value equality as well as key -// presence. * `featurestore_id`: Supports = comparisons. Examples: * -// `description = "foo bar" --> Any Feature with description exactly equal to -// `foo bar` * `value_type = DOUBLE` --> Features whose type is DOUBLE. * -// `labels.active = yes AND labels.env = prod` --> Features having both -// (active: yes) and (env: prod) labels. * `labels.env: *` --> Any Feature -// which has a label with `env` as the key. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Query(query string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { - c.urlParams_.Set("query", query) +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -60206,27 +63708,27 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -60234,7 +63736,7 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/featurestores:searchFeatures") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -60242,18 +63744,18 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.searchFeatures" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchFeaturesResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListFeaturesResponse.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 *ProjectsLocationsFeaturestoresSearchFeaturesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchFeaturesResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60272,7 +63774,7 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchFeaturesResponse{ + ret := &GoogleCloudAiplatformV1ListFeaturesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60288,7 +63790,7 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Do(opts ...googleapi. // 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 *ProjectsLocationsFeaturestoresSearchFeaturesCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchFeaturesResponse) error) error { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -60306,81 +63808,98 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Pages(ctx context.Con } } -type ProjectsLocationsFeaturestoresSetIamPolicyCall struct { +type ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall struct { s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + name string + googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +// Patch: Updates the parameters of a single Feature. // -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsFeaturestoresService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeaturestoresSetIamPolicyCall { - c := &ProjectsLocationsFeaturestoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: Immutable. Name of the Feature. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}/features/{feature}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat +// ures/{feature}` The last part feature is assigned by the client. The +// feature can be up to 64 characters long and can consist only of ASCII +// Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting +// with a letter. The value will be unique given an entity type. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Patch(name string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the Features resource by the update. +// The fields specified in the update_mask are relative to the resource, not +// the full request. A field will be overwritten if it is in the mask. If the +// user does not provide a mask then only the non-empty fields present in the +// request will be overwritten. Set the update_mask to `*` to override all +// fields. Updatable fields: * `description` * `labels` * `disable_monitoring` +// (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not +// supported for FeaturestoreService FeatureStore) +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsFeaturestoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudAiplatformV1Feature.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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60399,7 +63918,7 @@ func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudAiplatformV1Feature{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60412,68 +63931,60 @@ func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsFeaturestoresTestIamPermissionsCall struct { +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// 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`. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsFeaturestoresService) TestIamPermissions(resource string) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { - c := &ProjectsLocationsFeaturestoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Permissions sets the optional parameter "permissions": The set of -// permissions to check for the `resource`. Permissions with wildcards (such as -// `*` or `storage.*`) are not allowed. For more information see IAM Overview -// (https://cloud.google.com/iam/docs/overview#permissions). -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall{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 // details. -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -60481,18 +63992,18 @@ func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) doRequest(alt str } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60511,7 +64022,7 @@ func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60524,89 +64035,74 @@ func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Do(opts ...google return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new EntityType in a given Featurestore. +// 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`. // -// - parent: The resource name of the Featurestore to create EntityTypes. -// Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) Create(parent string, googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { - c := &ProjectsLocationsFeaturestoresEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1entitytype = googlecloudaiplatformv1entitytype - return c -} - -// EntityTypeId sets the optional parameter "entityTypeId": Required. The ID to -// use for the EntityType, which will become the final component of the -// EntityType's resource name. This value may be up to 60 characters, and valid -// characters are `[a-z0-9_]`. The first character cannot be a number. The -// value must be unique within a featurestore. -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) EntityTypeId(entityTypeId string) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { - c.urlParams_.Set("entityTypeId", entityTypeId) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1entitytype) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entityTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } 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.featurestores.entityTypes.create" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.delete" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60625,7 +64121,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Do(opts ...googlea 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, @@ -60638,65 +64134,68 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single EntityType. The EntityType must not have any -// Features or `force` must be set to true for the request to succeed. +// 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 EntityType to be deleted. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { - c := &ProjectsLocationsFeaturestoresEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any Features for -// this EntityType will also be deleted. (Otherwise, the request will only work -// if the EntityType has no Features.) -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Force(force bool) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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 } @@ -60707,13 +64206,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.get" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60745,87 +64244,104 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1deletefeaturevaluesrequest *GoogleCloudAiplatformV1DeleteFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DeleteFeatureValues: Delete Feature values from Featurestore. The progress -// of the deletion is tracked by the returned operation. The deleted feature -// values are guaranteed to be invisible to subsequent read operations after -// the operation is marked as successfully done. If a delete feature values -// operation fails, the feature values returned from reads and exports may be -// inconsistent. If consistency is required, the caller must retry the same -// delete request again and wait till the new operation returned is marked as -// successfully done. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - entityType: The resource name of the EntityType grouping the Features for -// which values are being deleted from. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entityType}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) DeleteFeatureValues(entityType string, googlecloudaiplatformv1deletefeaturevaluesrequest *GoogleCloudAiplatformV1DeleteFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1deletefeaturevaluesrequest = googlecloudaiplatformv1deletefeaturevaluesrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) List(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + 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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deletefeaturevaluesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+entityType}:deleteFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.deleteFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.list" call. // 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 +// *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 *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60844,7 +64360,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60857,62 +64373,90 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Do(op return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1exportfeaturevaluesrequest *GoogleCloudAiplatformV1ExportFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// ExportFeatureValues: Exports Feature values from all the entities of a -// target EntityType. +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall 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. // -// - entityType: The resource name of the EntityType from which to export -// Feature values. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) ExportFeatureValues(entityType string, googlecloudaiplatformv1exportfeaturevaluesrequest *GoogleCloudAiplatformV1ExportFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1exportfeaturevaluesrequest = googlecloudaiplatformv1exportfeaturevaluesrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall{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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportfeaturevaluesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:exportFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -60920,18 +64464,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) doReq } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.exportFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.wait" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60963,22 +64507,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Do(op return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single EntityType. +// 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`. // -// - name: The name of the EntityType resource. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesGetCall { - c := &ProjectsLocationsFeaturestoresEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -60986,45 +64535,34 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -61035,13 +64573,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1EntityType.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 *ProjectsLocationsFeaturestoresEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EntityType, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61060,7 +64598,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1EntityType{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61073,91 +64611,74 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall struct { +type ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// 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`. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) GetIamPolicy(resource string) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { - c := &ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no -// conditional role bindings may specify any valid value or leave the field -// unset. The policy in the response might use the policy version that you -// specified, or it might use a lower policy version. For example, if you -// specify version 3, but the policy has no conditional role bindings, the -// response uses version 1. To learn which resources support conditions in -// their IAM policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61176,7 +64697,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61189,93 +64710,85 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1importfeaturevaluesrequest *GoogleCloudAiplatformV1ImportFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ImportFeatureValues: Imports Feature values into the Featurestore from a -// source storage. The progress of the import is tracked by the returned -// operation. The imported features are guaranteed to be visible to subsequent -// read operations after the operation is marked as successfully done. If an -// import operation fails, the Feature values returned from reads and exports -// may be inconsistent. If consistency is required, the caller must retry the -// same import request again and wait till the new operation returned is marked -// as successfully done. There are also scenarios where the caller can cause -// inconsistency. - Source data for import contains multiple distinct Feature -// values for the same entity ID and timestamp. - Source is modified during an -// import. This includes adding, updating, or removing source data and/or -// metadata. Examples of updating metadata include but are not limited to -// changing storage location, storage class, or retention policy. - Online -// serving cluster is under-provisioned. +// 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. // -// - entityType: The resource name of the EntityType grouping the Features for -// which values are being imported. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entityType}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) ImportFeatureValues(entityType string, googlecloudaiplatformv1importfeaturevaluesrequest *GoogleCloudAiplatformV1ImportFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1importfeaturevaluesrequest = googlecloudaiplatformv1importfeaturevaluesrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall{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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ -} - -func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importfeaturevaluesrequest) - if err != nil { - return nil, err +} + +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+entityType}:importFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.importFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.get" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61307,80 +64820,49 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Do(op return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesListCall struct { +type ProjectsLocationsFeaturestoresEntityTypesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists EntityTypes in a given Featurestore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Featurestore to list EntityTypes. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesListCall { - c := &ProjectsLocationsFeaturestoresEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) List(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": Lists the EntityTypes that -// match the filter expression. The following filters are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. -// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, -// `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339 format. * -// `labels`: Supports key-value equality as well as key presence. Examples: * -// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > -// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after -// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` -// --> EntityTypes having both (active: yes) and (env: prod) labels. * -// `labels.env: *` --> Any EntityType which has a label with 'env' as the key. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `entity_type_id` * `create_time` * -// `update_time` -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// EntityTypes to return. The service may return fewer than this value. If -// unspecified, at most 1000 EntityTypes will be returned. The maximum value is -// 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.ListEntityTypes call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.ListEntityTypes must match the call that provided the -// page token. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresEntityTypesListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61388,27 +64870,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Fields(s ...googleap // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -61416,7 +64898,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entityTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -61424,18 +64906,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) doRequest(alt string } 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.featurestores.entityTypes.list" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListEntityTypesResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListEntityTypesResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61454,7 +64936,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListEntityTypesResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61470,7 +64952,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Do(opts ...googleapi // 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 *ProjectsLocationsFeaturestoresEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListEntityTypesResponse) error) error { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -61488,85 +64970,71 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Pages(ctx context.Co } } -type ProjectsLocationsFeaturestoresEntityTypesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single EntityType. +// 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: Immutable. Name of the EntityType. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` The last part entity_type is assigned by the client. -// The entity_type can be up to 64 characters long and can consist only of -// ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 -// starting with a letter. The value will be unique given a featurestore. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) Patch(name string, googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { - c := &ProjectsLocationsFeaturestoresEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1entitytype = googlecloudaiplatformv1entitytype return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the EntityType resource by the -// update. The fields specified in the update_mask are relative to the -// resource, not the full request. A field will be overwritten if it is in the -// mask. If the user does not provide a mask then only the non-empty fields -// present in the request will be overwritten. Set the update_mask to `*` to -// override all fields. Updatable fields: * `description` * `labels` * -// `monitoring_config.snapshot_analysis.disabled` * -// `monitoring_config.snapshot_analysis.monitoring_interval_days` * -// `monitoring_config.snapshot_analysis.staleness_days` * -// `monitoring_config.import_features_analysis.state` * -// `monitoring_config.import_features_analysis.anomaly_detection_baseline` * -// `monitoring_config.numerical_threshold_config.value` * -// `monitoring_config.categorical_threshold_config.value` * -// `offline_storage_ttl_days` -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1entitytype) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -61577,13 +65045,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.patch" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1EntityType.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EntityType, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61602,7 +65070,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1EntityType{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61615,64 +65083,60 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1readfeaturevaluesrequest *GoogleCloudAiplatformV1ReadFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ReadFeatureValues: Reads Feature values of a specific entity of an -// EntityType. For reading feature values of multiple entities of an -// EntityType, please use StreamingReadFeatureValues. +// 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`. // -// - entityType: The resource name of the EntityType for the entity being read. -// Value format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entityType}`. For example, for a machine learning model predicting -// user clicks on a website, an EntityType ID could be `user`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) ReadFeatureValues(entityType string, googlecloudaiplatformv1readfeaturevaluesrequest *GoogleCloudAiplatformV1ReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1readfeaturevaluesrequest = googlecloudaiplatformv1readfeaturevaluesrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsFeaturestoresOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresOperationsCancelCall { + c := &ProjectsLocationsFeaturestoresOperationsCancelCall{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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1readfeaturevaluesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:readFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -61680,18 +65144,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) doReque } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.readFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ReadFeatureValuesResponse.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 *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadFeatureValuesResponse, error) { +// *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 *ProjectsLocationsFeaturestoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61710,7 +65174,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ReadFeatureValuesResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61723,81 +65187,74 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Do(opts return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +// 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`. // -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { - c := &ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsFeaturestoresOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresOperationsDeleteCall { + c := &ProjectsLocationsFeaturestoresOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61816,7 +65273,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61829,82 +65286,85 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1streamingreadfeaturevaluesrequest *GoogleCloudAiplatformV1StreamingReadFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StreamingReadFeatureValues: Reads Feature values for multiple entities. -// Depending on their size, data for different entities may be broken up across -// multiple responses. +// 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. // -// - entityType: The resource name of the entities' type. Value format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entityType}`. For example, for a machine learning model predicting -// user clicks on a website, an EntityType ID could be `user`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) StreamingReadFeatureValues(entityType string, googlecloudaiplatformv1streamingreadfeaturevaluesrequest *GoogleCloudAiplatformV1StreamingReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1streamingreadfeaturevaluesrequest = googlecloudaiplatformv1streamingreadfeaturevaluesrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeaturestoresOperationsService) Get(name string) *ProjectsLocationsFeaturestoresOperationsGetCall { + c := &ProjectsLocationsFeaturestoresOperationsGetCall{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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingreadfeaturevaluesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+entityType}:streamingReadFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.streamingReadFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ReadFeatureValuesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadFeatureValuesResponse, error) { +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61923,7 +65383,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ReadFeatureValuesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61936,87 +65396,104 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) TestIamPermissions(resource string) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { - c := &ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeaturestoresOperationsService) List(name string) *ProjectsLocationsFeaturestoresOperationsListCall { + c := &ProjectsLocationsFeaturestoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Permissions sets the optional parameter "permissions": The set of -// permissions to check for the `resource`. Permissions with wildcards (such as -// `*` or `storage.*`) are not allowed. For more information see IAM Overview -// (https://cloud.google.com/iam/docs/overview#permissions). -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeaturestoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeaturestoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresOperationsListCall { + 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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFeaturestoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// *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 *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62035,7 +65512,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62048,66 +65525,90 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Do(opt return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1writefeaturevaluesrequest *GoogleCloudAiplatformV1WriteFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsFeaturestoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsFeaturestoresOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// WriteFeatureValues: Writes Feature values of one or more entities of an -// EntityType. The Feature values are merged into existing entities if any. The -// Feature values to be written must have timestamp within the online storage -// retention. +// 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. // -// - entityType: The resource name of the EntityType for the entities being -// written. Value format: -// `projects/{project}/locations/{location}/featurestores/ -// {featurestore}/entityTypes/{entityType}`. For example, for a machine -// learning model predicting user clicks on a website, an EntityType ID could -// be `user`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) WriteFeatureValues(entityType string, googlecloudaiplatformv1writefeaturevaluesrequest *GoogleCloudAiplatformV1WriteFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1writefeaturevaluesrequest = googlecloudaiplatformv1writefeaturevaluesrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeaturestoresOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresOperationsWaitCall { + c := &ProjectsLocationsFeaturestoresOperationsWaitCall{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 *ProjectsLocationsFeaturestoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1writefeaturevaluesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:writeFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -62115,18 +65616,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.writeFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1WriteFeatureValuesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1WriteFeatureValuesResponse, error) { +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62145,7 +65646,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1WriteFeatureValuesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62158,62 +65659,68 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Do(opt return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsHyperparameterTuningJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelhyperparametertuningjobrequest *GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates a batch of Features in a given EntityType. +// Cancel: Cancels a HyperparameterTuningJob. Starts asynchronous cancellation +// on the HyperparameterTuningJob. The server makes a best effort to cancel the +// job, but success is not guaranteed. Clients can use +// JobService.GetHyperparameterTuningJob or other methods to check whether the +// cancellation succeeded or whether the job completed despite cancellation. On +// successful cancellation, the HyperparameterTuningJob is not deleted; instead +// it becomes a job with a HyperparameterTuningJob.error value with a +// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and +// HyperparameterTuningJob.state is set to `CANCELLED`. // -// - parent: The resource name of the EntityType/FeatureGroup to create the -// batch of Features under. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest +// - name: The name of the HyperparameterTuningJob to cancel. Format: +// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar +// ameter_tuning_job}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) Cancel(name string, googlecloudaiplatformv1cancelhyperparametertuningjobrequest *GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest) *ProjectsLocationsHyperparameterTuningJobsCancelCall { + c := &ProjectsLocationsHyperparameterTuningJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1cancelhyperparametertuningjobrequest = googlecloudaiplatformv1cancelhyperparametertuningjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { +func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { +func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelhyperparametertuningjobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -62221,18 +65728,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) doReq } 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.featurestores.entityTypes.features.batchCreate" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.cancel" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsHyperparameterTuningJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62251,7 +65758,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Do(op 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, @@ -62264,72 +65771,60 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Do(op return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsHyperparameterTuningJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1hyperparametertuningjob *GoogleCloudAiplatformV1HyperparameterTuningJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Feature in a given EntityType. +// Create: Creates a HyperparameterTuningJob // -// - parent: The resource name of the EntityType or FeatureGroup to create a -// Feature. Format for entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to create the +// HyperparameterTuningJob in. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) Create(parent string, googlecloudaiplatformv1hyperparametertuningjob *GoogleCloudAiplatformV1HyperparameterTuningJob) *ProjectsLocationsHyperparameterTuningJobsCreateCall { + c := &ProjectsLocationsHyperparameterTuningJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature - return c -} - -// FeatureId sets the optional parameter "featureId": Required. The ID to use -// for the Feature, which will become the final component of the Feature's -// resource name. This value may be up to 128 characters, and valid characters -// are `[a-z0-9_]`. The first character cannot be a number. The value must be -// unique within an EntityType/FeatureGroup. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { - c.urlParams_.Set("featureId", featureId) + c.googlecloudaiplatformv1hyperparametertuningjob = googlecloudaiplatformv1hyperparametertuningjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1hyperparametertuningjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hyperparameterTuningJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -62342,13 +65837,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.create" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.create" call. // 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 +// *GoogleCloudAiplatformV1HyperparameterTuningJob.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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1HyperparameterTuningJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62367,7 +65862,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1HyperparameterTuningJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62380,7 +65875,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts .. return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall struct { +type ProjectsLocationsHyperparameterTuningJobsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62388,15 +65883,14 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Feature. +// Delete: Deletes a HyperparameterTuningJob. // -// - name: The name of the Features to be deleted. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat -// ures/{feature}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the HyperparameterTuningJob resource to be deleted. +// Format: +// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar +// ameter_tuning_job}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) Delete(name string) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { + c := &ProjectsLocationsHyperparameterTuningJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62404,27 +65898,27 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Delete(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -62442,13 +65936,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.delete" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.delete" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62480,7 +65974,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Do(opts .. return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall struct { +type ProjectsLocationsHyperparameterTuningJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62489,14 +65983,13 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall struct { header_ http.Header } -// Get: Gets details of a single Feature. +// Get: Gets a HyperparameterTuningJob // -// - name: The name of the Feature resource. Format for entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the HyperparameterTuningJob resource. Format: +// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar +// ameter_tuning_job}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) Get(name string) *ProjectsLocationsHyperparameterTuningJobsGetCall { + c := &ProjectsLocationsHyperparameterTuningJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62504,7 +65997,7 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Get(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62512,27 +66005,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Fields(s ...g // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -62553,13 +66046,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.get" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Feature.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1HyperparameterTuningJob.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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1HyperparameterTuningJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62578,7 +66071,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Feature{ + ret := &GoogleCloudAiplatformV1HyperparameterTuningJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62591,7 +66084,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall struct { +type ProjectsLocationsHyperparameterTuningJobsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -62600,78 +66093,52 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall struct { header_ http.Header } -// List: Lists Features in a given EntityType. +// List: Lists HyperparameterTuningJobs in a Location. // -// - parent: The resource name of the Location to list Features. Format for -// entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to list the +// HyperparameterTuningJobs from. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) List(parent string) *ProjectsLocationsHyperparameterTuningJobsListCall { + c := &ProjectsLocationsHyperparameterTuningJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Lists the Features that match -// the filter expression. The following filters are supported: * `value_type`: -// Supports = and != comparisons. * `create_time`: Supports =, !=, <, >, >=, -// and <= comparisons. Values must be in RFC 3339 format. * `update_time`: -// Supports =, !=, <, >, >=, and <= comparisons. Values must be in RFC 3339 -// format. * `labels`: Supports key-value equality as well as key presence. -// Examples: * `value_type = DOUBLE` --> Features whose type is DOUBLE. * -// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > -// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after -// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` -// --> Features having both (active: yes) and (env: prod) labels. * -// `labels.env: *` --> Any Feature which has a label with 'env' as the key. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Filter(filter string) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("filter", filter) return c } -// LatestStatsCount sets the optional parameter "latestStatsCount": Only -// applicable for Vertex AI Feature Store (Legacy). If set, return the most -// recent ListFeaturesRequest.latest_stats_count of stats for each Feature in -// response. Valid value is [0, 10]. If number of stats exists < -// ListFeaturesRequest.latest_stats_count, return all existing stats. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) LatestStatsCount(latestStatsCount int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { - c.urlParams_.Set("latestStatsCount", fmt.Sprint(latestStatsCount)) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `feature_id` * `value_type` (Not -// supported for FeatureRegistry Feature) * `create_time` * `update_time` -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Features to return. The service may return fewer than this value. If -// unspecified, at most 1000 Features will be returned. The maximum value is -// 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) PageSize(pageSize int64) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.ListFeatures call or -// FeatureRegistryService.ListFeatures call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must -// match the call that provided the page token. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via +// ListHyperparameterTuningJobsResponse.next_page_token of the previous +// JobService.ListHyperparameterTuningJobs call. +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) PageToken(pageToken string) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadMask sets the optional parameter "readMask": Mask specifying which // fields to read. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) ReadMask(readMask string) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -62679,7 +66146,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) ReadMask(rea // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62687,27 +66154,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Fields(s ... // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -62715,7 +66182,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hyperparameterTuningJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -62728,13 +66195,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.list" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeaturesResponse.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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturesResponse, error) { +// *GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse.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 *ProjectsLocationsHyperparameterTuningJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62753,7 +66220,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeaturesResponse{ + ret := &GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62769,7 +66236,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturesResponse) error) error { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -62787,130 +66254,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Pages(ctx co } } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single Feature. -// -// - name: Immutable. Name of the Feature. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat -// ures/{feature}` The last part feature is assigned by the client. The -// feature can be up to 64 characters long and can consist only of ASCII -// Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting -// with a letter. The value will be unique given an entity type. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Patch(name string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Features resource by the update. -// The fields specified in the update_mask are relative to the resource, not -// the full request. A field will be overwritten if it is in the mask. If the -// user does not provide a mask then only the non-empty fields present in the -// request will be overwritten. Set the update_mask to `*` to override all -// fields. Updatable fields: * `description` * `labels` * `disable_monitoring` -// (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not -// supported for FeaturestoreService FeatureStore) -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Feature.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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, 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 := &GoogleCloudAiplatformV1Feature{ - 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 -} - -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62929,8 +66273,8 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall struc // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Cancel(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62938,27 +66282,27 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Can // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -62976,13 +66320,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.cancel" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63014,7 +66358,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63028,8 +66372,8 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall struc // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Delete(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63037,27 +66381,27 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Del // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -63075,13 +66419,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.delete" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.delete" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63113,7 +66457,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63127,8 +66471,8 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Get(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63136,7 +66480,7 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Get // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63144,27 +66488,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Fie // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -63185,13 +66529,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.get" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.get" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63223,7 +66567,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Do( return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63236,28 +66580,28 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall struct // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) List(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) List(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Filter(filter string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -63265,7 +66609,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Pa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63273,27 +66617,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Fi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -63314,13 +66658,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) do return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.list" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.list" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63355,7 +66699,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Do // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -63373,7 +66717,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Pa } } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63392,8 +66736,8 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall struct // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Wait(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63402,7 +66746,7 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Wai // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -63410,27 +66754,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Ti // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -63448,13 +66792,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) do return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.wait" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.wait" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63486,60 +66830,59 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Do return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint + urlParams_ gensupport.URLParams + ctx_ context.Context + 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`. +// Create: Creates an IndexEndpoint. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the IndexEndpoint in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsIndexEndpointsService) Create(parent string, googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint) *ProjectsLocationsIndexEndpointsCreateCall { + c := &ProjectsLocationsIndexEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1indexendpoint = googlecloudaiplatformv1indexendpoint return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { +func (c *ProjectsLocationsIndexEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { +func (c *ProjectsLocationsIndexEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsIndexEndpointsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1indexendpoint) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexEndpoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -63547,18 +66890,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) doReques } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.create" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsIndexEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63577,7 +66920,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Do(opts 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, @@ -63590,7 +66933,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Do(opts return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall struct { +type ProjectsLocationsIndexEndpointsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63598,14 +66941,12 @@ type ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall struct { 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`. +// Delete: Deletes an IndexEndpoint. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the IndexEndpoint resource to be deleted. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) Delete(name string) *ProjectsLocationsIndexEndpointsDeleteCall { + c := &ProjectsLocationsIndexEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63613,27 +66954,27 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -63651,123 +66992,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.delete" call. -// 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) 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 -} - -type ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall{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 -// details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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.featurestores.entityTypes.operations.get" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.delete" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63799,104 +67030,80 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsDeployIndexCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1deployindexrequest *GoogleCloudAiplatformV1DeployIndexRequest + urlParams_ gensupport.URLParams + 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`. +// DeployIndex: Deploys an Index into this IndexEndpoint, creating a +// DeployedIndex within it. Only non-empty Indexes can be deployed. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) List(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - indexEndpoint: The name of the IndexEndpoint resource into which to deploy +// an Index. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) DeployIndex(indexEndpoint string, googlecloudaiplatformv1deployindexrequest *GoogleCloudAiplatformV1DeployIndexRequest) *ProjectsLocationsIndexEndpointsDeployIndexCall { + c := &ProjectsLocationsIndexEndpointsDeployIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1deployindexrequest = googlecloudaiplatformv1deployindexrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsDeployIndexCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsDeployIndexCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deployindexrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:deployIndex") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.list" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.deployIndex" call. // 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 +// *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 *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63915,7 +67122,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -63923,95 +67130,65 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Do(opts .. } target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) + return nil, err } + return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsFindNeighborsCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1findneighborsrequest *GoogleCloudAiplatformV1FindNeighborsRequest + 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. +// FindNeighbors: Finds the nearest neighbors of each vector within the +// request. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall{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 *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - indexEndpoint: The name of the index endpoint. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) FindNeighbors(indexEndpoint string, googlecloudaiplatformv1findneighborsrequest *GoogleCloudAiplatformV1FindNeighborsRequest) *ProjectsLocationsIndexEndpointsFindNeighborsCall { + c := &ProjectsLocationsIndexEndpointsFindNeighborsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1findneighborsrequest = googlecloudaiplatformv1findneighborsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsFindNeighborsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsFindNeighborsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1findneighborsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:findNeighbors") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64019,18 +67196,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.wait" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.findNeighbors" call. // 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 +// *GoogleCloudAiplatformV1FindNeighborsResponse.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 *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FindNeighborsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64049,7 +67226,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1FindNeighborsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64062,27 +67239,21 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Do(opts .. return ret, nil } -type ProjectsLocationsFeaturestoresOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + 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`. +// Get: Gets an IndexEndpoint. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsFeaturestoresOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresOperationsCancelCall { - c := &ProjectsLocationsFeaturestoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the IndexEndpoint resource. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) Get(name string) *ProjectsLocationsIndexEndpointsGetCall { + c := &ProjectsLocationsIndexEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -64090,34 +67261,45 @@ func (r *ProjectsLocationsFeaturestoresOperationsService) Cancel(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsCancelCall { +func (c *ProjectsLocationsIndexEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsIndexEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsCancelCall { +func (c *ProjectsLocationsIndexEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -64128,13 +67310,13 @@ func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.get" call. // 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 *ProjectsLocationsFeaturestoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1IndexEndpoint.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 *ProjectsLocationsIndexEndpointsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1IndexEndpoint, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64153,7 +67335,7 @@ func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1IndexEndpoint{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64166,74 +67348,122 @@ func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsFeaturestoresOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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`. +// List: Lists IndexEndpoints in a Location. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeaturestoresOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresOperationsDeleteCall { - c := &ProjectsLocationsFeaturestoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location from which to list the +// IndexEndpoints. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsIndexEndpointsService) List(parent string) *ProjectsLocationsIndexEndpointsListCall { + c := &ProjectsLocationsIndexEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `index_endpoint` supports = and !=. `index_endpoint` represents +// the IndexEndpoint ID, ie. the last segment of the IndexEndpoint's +// resourcename. * `display_name` supports =, != and regex() (uses re2 +// (https://github.com/google/re2/wiki/Syntax) syntax) * `labels` supports +// general map functions that is: `labels.key=value` - key:value equality +// `labels.key:* or labels:key - key existence A key including a space must be +// quoted. `labels."a key". Some examples: * `index_endpoint="1" * +// `display_name="myDisplayName" * `regex(display_name, "^A") -> The display +// name starts with an A. * `labels.myKey="myValue" +func (c *ProjectsLocationsIndexEndpointsListCall) Filter(filter string) *ProjectsLocationsIndexEndpointsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsIndexEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexEndpointsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListIndexEndpointsResponse.next_page_token of +// the previous IndexEndpointService.ListIndexEndpoints call. +func (c *ProjectsLocationsIndexEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsIndexEndpointsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsIndexEndpointsListCall) ReadMask(readMask string) *ProjectsLocationsIndexEndpointsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsIndexEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexEndpoints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.delete" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.list" call. // 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 *ProjectsLocationsFeaturestoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListIndexEndpointsResponse.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 *ProjectsLocationsIndexEndpointsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListIndexEndpointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64252,7 +67482,7 @@ func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListIndexEndpointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64265,85 +67495,101 @@ func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsFeaturestoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsIndexEndpointsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListIndexEndpointsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// 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. +type ProjectsLocationsIndexEndpointsMutateDeployedIndexCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1deployedindex *GoogleCloudAiplatformV1DeployedIndex + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MutateDeployedIndex: Update an existing DeployedIndex under an +// IndexEndpoint. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeaturestoresOperationsService) Get(name string) *ProjectsLocationsFeaturestoresOperationsGetCall { - c := &ProjectsLocationsFeaturestoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - indexEndpoint: The name of the IndexEndpoint resource into which to deploy +// an Index. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) MutateDeployedIndex(indexEndpoint string, googlecloudaiplatformv1deployedindex *GoogleCloudAiplatformV1DeployedIndex) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { + c := &ProjectsLocationsIndexEndpointsMutateDeployedIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1deployedindex = googlecloudaiplatformv1deployedindex return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsGetCall { +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsGetCall { +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deployedindex) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:mutateDeployedIndex") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.get" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.mutateDeployedIndex" call. // 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 *ProjectsLocationsFeaturestoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64375,87 +67621,67 @@ func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsFeaturestoresOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint + urlParams_ gensupport.URLParams + 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`. +// Patch: Updates an IndexEndpoint. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeaturestoresOperationsService) List(name string) *ProjectsLocationsFeaturestoresOperationsListCall { - c := &ProjectsLocationsFeaturestoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The resource name of the IndexEndpoint. +func (r *ProjectsLocationsIndexEndpointsService) Patch(name string, googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint) *ProjectsLocationsIndexEndpointsPatchCall { + c := &ProjectsLocationsIndexEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1indexendpoint = googlecloudaiplatformv1indexendpoint return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. See google.protobuf.FieldMask. +func (c *ProjectsLocationsIndexEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsIndexEndpointsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsListCall { +func (c *ProjectsLocationsIndexEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsListCall { +func (c *ProjectsLocationsIndexEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsIndexEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1indexendpoint) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -64466,13 +67692,13 @@ func (c *ProjectsLocationsFeaturestoresOperationsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.list" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1IndexEndpoint.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 *ProjectsLocationsFeaturestoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsIndexEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1IndexEndpoint, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64491,7 +67717,7 @@ func (c *ProjectsLocationsFeaturestoresOperationsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1IndexEndpoint{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64504,90 +67730,60 @@ func (c *ProjectsLocationsFeaturestoresOperationsListCall) Do(opts ...googleapi. return ret, nil } -// 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 *ProjectsLocationsFeaturestoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsFeaturestoresOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsReadIndexDatapointsCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1readindexdatapointsrequest *GoogleCloudAiplatformV1ReadIndexDatapointsRequest + 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. +// ReadIndexDatapoints: Reads the datapoints/vectors of the given IDs. A +// maximum of 1000 datapoints can be retrieved in a batch. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeaturestoresOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresOperationsWaitCall { - c := &ProjectsLocationsFeaturestoresOperationsWaitCall{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 *ProjectsLocationsFeaturestoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - indexEndpoint: The name of the index endpoint. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) ReadIndexDatapoints(indexEndpoint string, googlecloudaiplatformv1readindexdatapointsrequest *GoogleCloudAiplatformV1ReadIndexDatapointsRequest) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { + c := &ProjectsLocationsIndexEndpointsReadIndexDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1readindexdatapointsrequest = googlecloudaiplatformv1readindexdatapointsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsWaitCall { +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsWaitCall { +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1readindexdatapointsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:readIndexDatapoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64595,18 +67791,18 @@ func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.wait" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.readIndexDatapoints" call. // 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 +// *GoogleCloudAiplatformV1ReadIndexDatapointsResponse.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 *ProjectsLocationsFeaturestoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadIndexDatapointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64625,7 +67821,7 @@ func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ReadIndexDatapointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64638,68 +67834,61 @@ func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelhyperparametertuningjobrequest *GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsUndeployIndexCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1undeployindexrequest *GoogleCloudAiplatformV1UndeployIndexRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a HyperparameterTuningJob. Starts asynchronous cancellation -// on the HyperparameterTuningJob. The server makes a best effort to cancel the -// job, but success is not guaranteed. Clients can use -// JobService.GetHyperparameterTuningJob or other methods to check whether the -// cancellation succeeded or whether the job completed despite cancellation. On -// successful cancellation, the HyperparameterTuningJob is not deleted; instead -// it becomes a job with a HyperparameterTuningJob.error value with a -// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and -// HyperparameterTuningJob.state is set to `CANCELLED`. +// UndeployIndex: Undeploys an Index from an IndexEndpoint, removing a +// DeployedIndex from it, and freeing all resources it's using. // -// - name: The name of the HyperparameterTuningJob to cancel. Format: -// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar -// ameter_tuning_job}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) Cancel(name string, googlecloudaiplatformv1cancelhyperparametertuningjobrequest *GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest) *ProjectsLocationsHyperparameterTuningJobsCancelCall { - c := &ProjectsLocationsHyperparameterTuningJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1cancelhyperparametertuningjobrequest = googlecloudaiplatformv1cancelhyperparametertuningjobrequest +// - indexEndpoint: The name of the IndexEndpoint resource from which to +// undeploy an Index. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) UndeployIndex(indexEndpoint string, googlecloudaiplatformv1undeployindexrequest *GoogleCloudAiplatformV1UndeployIndexRequest) *ProjectsLocationsIndexEndpointsUndeployIndexCall { + c := &ProjectsLocationsIndexEndpointsUndeployIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1undeployindexrequest = googlecloudaiplatformv1undeployindexrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsCancelCall { +func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsUndeployIndexCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsCancelCall { +func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsUndeployIndexCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelhyperparametertuningjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1undeployindexrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:undeployIndex") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64707,18 +67896,18 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.cancel" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.undeployIndex" call. // 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 *ProjectsLocationsHyperparameterTuningJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsIndexEndpointsUndeployIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64737,7 +67926,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Do(opts ...googlea 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, @@ -64750,60 +67939,60 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1hyperparametertuningjob *GoogleCloudAiplatformV1HyperparameterTuningJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a HyperparameterTuningJob +// 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 -// HyperparameterTuningJob in. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) Create(parent string, googlecloudaiplatformv1hyperparametertuningjob *GoogleCloudAiplatformV1HyperparameterTuningJob) *ProjectsLocationsHyperparameterTuningJobsCreateCall { - c := &ProjectsLocationsHyperparameterTuningJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1hyperparametertuningjob = googlecloudaiplatformv1hyperparametertuningjob +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsIndexEndpointsOperationsService) Cancel(name string) *ProjectsLocationsIndexEndpointsOperationsCancelCall { + c := &ProjectsLocationsIndexEndpointsOperationsCancelCall{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 // details. -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsCreateCall { +func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsCreateCall { +func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1hyperparametertuningjob) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hyperparameterTuningJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64811,18 +68000,18 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) doRequest(alt stri } 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.hyperparameterTuningJobs.create" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1HyperparameterTuningJob.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 *ProjectsLocationsHyperparameterTuningJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1HyperparameterTuningJob, error) { +// *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 *ProjectsLocationsIndexEndpointsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64841,7 +68030,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1HyperparameterTuningJob{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64854,7 +68043,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsDeleteCall struct { +type ProjectsLocationsIndexEndpointsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -64862,14 +68051,14 @@ type ProjectsLocationsHyperparameterTuningJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a HyperparameterTuningJob. +// 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 HyperparameterTuningJob resource to be deleted. -// Format: -// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar -// ameter_tuning_job}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) Delete(name string) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { - c := &ProjectsLocationsHyperparameterTuningJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsIndexEndpointsOperationsService) Delete(name string) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { + c := &ProjectsLocationsIndexEndpointsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -64877,27 +68066,27 @@ func (r *ProjectsLocationsHyperparameterTuningJobsService) Delete(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -64915,13 +68104,13 @@ func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.delete" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.delete" call. // 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 *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64940,7 +68129,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Do(opts ...googlea 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, @@ -64953,7 +68142,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsGetCall struct { +type ProjectsLocationsIndexEndpointsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -64962,13 +68151,13 @@ type ProjectsLocationsHyperparameterTuningJobsGetCall struct { header_ http.Header } -// Get: Gets a HyperparameterTuningJob +// 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 HyperparameterTuningJob resource. Format: -// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar -// ameter_tuning_job}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) Get(name string) *ProjectsLocationsHyperparameterTuningJobsGetCall { - c := &ProjectsLocationsHyperparameterTuningJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsIndexEndpointsOperationsService) Get(name string) *ProjectsLocationsIndexEndpointsOperationsGetCall { + c := &ProjectsLocationsIndexEndpointsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -64976,7 +68165,7 @@ func (r *ProjectsLocationsHyperparameterTuningJobsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsGetCall { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -64984,27 +68173,27 @@ func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsGetCall { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsGetCall { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -65025,13 +68214,13 @@ func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.get" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1HyperparameterTuningJob.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsHyperparameterTuningJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1HyperparameterTuningJob, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65050,7 +68239,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1HyperparameterTuningJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65063,69 +68252,49 @@ func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsListCall struct { +type ProjectsLocationsIndexEndpointsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists HyperparameterTuningJobs in a Location. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Location to list the -// HyperparameterTuningJobs from. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) List(parent string) *ProjectsLocationsHyperparameterTuningJobsListCall { - c := &ProjectsLocationsHyperparameterTuningJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsIndexEndpointsOperationsService) List(name string) *ProjectsLocationsIndexEndpointsOperationsListCall { + c := &ProjectsLocationsIndexEndpointsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Filter(filter string) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Filter(filter string) *ProjectsLocationsIndexEndpointsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) PageSize(pageSize int64) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexEndpointsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListHyperparameterTuningJobsResponse.next_page_token of the previous -// JobService.ListHyperparameterTuningJobs call. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) PageToken(pageToken string) *ProjectsLocationsHyperparameterTuningJobsListCall { +// token. +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIndexEndpointsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) ReadMask(readMask string) *ProjectsLocationsHyperparameterTuningJobsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -65133,27 +68302,27 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Fields(s ...googleap // IfNoneMatch sets an 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. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -65161,7 +68330,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hyperparameterTuningJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -65169,18 +68338,18 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) doRequest(alt string } 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.hyperparameterTuningJobs.list" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse.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 *ProjectsLocationsHyperparameterTuningJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse, error) { +// *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 *ProjectsLocationsIndexEndpointsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65199,7 +68368,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65215,7 +68384,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Do(opts ...googleapi // 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 *ProjectsLocationsHyperparameterTuningJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse) error) error { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -65233,111 +68402,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Pages(ctx context.Co } } -type ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - 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`. -// -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Cancel(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall{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 -// details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.hyperparameterTuningJobs.operations.cancel" call. -// 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 *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) 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 -} - -type ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall struct { +type ProjectsLocationsIndexEndpointsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -65345,159 +68410,63 @@ type ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall struct { 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 *ProjectsLocationsHyperparameterTuningJobsOperationsService) Delete(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall{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 -// details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.hyperparameterTuningJobs.operations.delete" call. -// 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 *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) 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 -} - -type ProjectsLocationsHyperparameterTuningJobsOperationsGetCall 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. +// 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. -func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Get(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsIndexEndpointsOperationsService) Wait(name string) *ProjectsLocationsIndexEndpointsOperationsWaitCall { + c := &ProjectsLocationsIndexEndpointsOperationsWaitCall{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 -// details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// 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 *ProjectsLocationsIndexEndpointsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsIndexEndpointsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { - c.ifNoneMatch_ = entityTag + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsWaitCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -65508,13 +68477,13 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.wait" call. // 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 *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65546,104 +68515,78 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index + urlParams_ gensupport.URLParams + 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`. +// Create: Creates an Index. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) List(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Filter(filter string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: The resource name of the Location to create the Index in. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsIndexesService) Create(parent string, googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index) *ProjectsLocationsIndexesCreateCall { + c := &ProjectsLocationsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1index = googlecloudaiplatformv1index return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { +func (c *ProjectsLocationsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { +func (c *ProjectsLocationsIndexesCreateCall) Context(ctx context.Context) *ProjectsLocationsIndexesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsIndexesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1index) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.list" call. +// Do executes the "aiplatform.projects.locations.indexes.create" call. // 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 +// *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 *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65662,7 +68605,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65675,28 +68618,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Do(opts .. return ret, nil } -// 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 *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall struct { +type ProjectsLocationsIndexesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -65704,63 +68626,48 @@ type ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall struct { 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. +// Delete: Deletes an Index. An Index can only be deleted when all its +// DeployedIndexes had been undeployed. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Wait(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Index resource to be deleted. Format: +// `projects/{project}/locations/{location}/indexes/{index}`. +func (r *ProjectsLocationsIndexesService) Delete(name string) *ProjectsLocationsIndexesDeleteCall { + c := &ProjectsLocationsIndexesDeleteCall{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 *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { - 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 // details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { +func (c *ProjectsLocationsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { +func (c *ProjectsLocationsIndexesDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsIndexesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -65771,13 +68678,13 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.indexes.delete" call. // 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 *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65809,78 +68716,84 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Do(opts .. return ret, nil } -type ProjectsLocationsIndexEndpointsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an IndexEndpoint. +// Get: Gets an Index. // -// - parent: The resource name of the Location to create the IndexEndpoint in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsIndexEndpointsService) Create(parent string, googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint) *ProjectsLocationsIndexEndpointsCreateCall { - c := &ProjectsLocationsIndexEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1indexendpoint = googlecloudaiplatformv1indexendpoint +// - name: The name of the Index resource. Format: +// `projects/{project}/locations/{location}/indexes/{index}`. +func (r *ProjectsLocationsIndexesService) Get(name string) *ProjectsLocationsIndexesGetCall { + c := &ProjectsLocationsIndexesGetCall{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 // details. -func (c *ProjectsLocationsIndexEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsCreateCall { +func (c *ProjectsLocationsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsCreateCall { +func (c *ProjectsLocationsIndexesGetCall) Context(ctx context.Context) *ProjectsLocationsIndexesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsCreateCall) Header() http.Header { +func (c *ProjectsLocationsIndexesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1indexendpoint) - if err != nil { - return nil, err +func (c *ProjectsLocationsIndexesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+parent}/indexEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.create" call. +// Do executes the "aiplatform.projects.locations.indexes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Index.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 *ProjectsLocationsIndexEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Index, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65899,7 +68812,7 @@ func (c *ProjectsLocationsIndexEndpointsCreateCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Index{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65912,72 +68825,112 @@ func (c *ProjectsLocationsIndexEndpointsCreateCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsIndexEndpointsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an IndexEndpoint. +// List: Lists Indexes in a Location. // -// - name: The name of the IndexEndpoint resource to be deleted. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) Delete(name string) *ProjectsLocationsIndexEndpointsDeleteCall { - c := &ProjectsLocationsIndexEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location from which to list the Indexes. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsIndexesService) List(parent string) *ProjectsLocationsIndexesListCall { + c := &ProjectsLocationsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsIndexesListCall) Filter(filter string) *ProjectsLocationsIndexesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsIndexesListCall) PageSize(pageSize int64) *ProjectsLocationsIndexesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListIndexesResponse.next_page_token of the +// previous IndexService.ListIndexes call. +func (c *ProjectsLocationsIndexesListCall) PageToken(pageToken string) *ProjectsLocationsIndexesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsIndexesListCall) ReadMask(readMask string) *ProjectsLocationsIndexesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsDeleteCall { +func (c *ProjectsLocationsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsDeleteCall { +func (c *ProjectsLocationsIndexesListCall) Context(ctx context.Context) *ProjectsLocationsIndexesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIndexesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.delete" call. +// Do executes the "aiplatform.projects.locations.indexes.list" call. // 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 +// *GoogleCloudAiplatformV1ListIndexesResponse.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 *ProjectsLocationsIndexEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListIndexesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65996,7 +68949,7 @@ func (c *ProjectsLocationsIndexEndpointsDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListIndexesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66009,80 +68962,106 @@ func (c *ProjectsLocationsIndexEndpointsDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsIndexEndpointsDeployIndexCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1deployindexrequest *GoogleCloudAiplatformV1DeployIndexRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsIndexesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListIndexesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// DeployIndex: Deploys an Index into this IndexEndpoint, creating a -// DeployedIndex within it. Only non-empty Indexes can be deployed. +type ProjectsLocationsIndexesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an Index. // -// - indexEndpoint: The name of the IndexEndpoint resource into which to deploy -// an Index. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) DeployIndex(indexEndpoint string, googlecloudaiplatformv1deployindexrequest *GoogleCloudAiplatformV1DeployIndexRequest) *ProjectsLocationsIndexEndpointsDeployIndexCall { - c := &ProjectsLocationsIndexEndpointsDeployIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1deployindexrequest = googlecloudaiplatformv1deployindexrequest +// - name: Output only. The resource name of the Index. +func (r *ProjectsLocationsIndexesService) Patch(name string, googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index) *ProjectsLocationsIndexesPatchCall { + c := &ProjectsLocationsIndexesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1index = googlecloudaiplatformv1index + return c +} + +// UpdateMask sets the optional parameter "updateMask": The update mask applies +// to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. +func (c *ProjectsLocationsIndexesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsIndexesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsDeployIndexCall { +func (c *ProjectsLocationsIndexesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsDeployIndexCall { +func (c *ProjectsLocationsIndexesPatchCall) Context(ctx context.Context) *ProjectsLocationsIndexesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Header() http.Header { +func (c *ProjectsLocationsIndexesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deployindexrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1index) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:deployIndex") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "indexEndpoint": c.indexEndpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.deployIndex" call. +// Do executes the "aiplatform.projects.locations.indexes.patch" call. // 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 *ProjectsLocationsIndexEndpointsDeployIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66114,60 +69093,59 @@ func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsIndexEndpointsFindNeighborsCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1findneighborsrequest *GoogleCloudAiplatformV1FindNeighborsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesRemoveDatapointsCall struct { + s *Service + index string + googlecloudaiplatformv1removedatapointsrequest *GoogleCloudAiplatformV1RemoveDatapointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FindNeighbors: Finds the nearest neighbors of each vector within the -// request. +// RemoveDatapoints: Remove Datapoints from an Index. // -// - indexEndpoint: The name of the index endpoint. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) FindNeighbors(indexEndpoint string, googlecloudaiplatformv1findneighborsrequest *GoogleCloudAiplatformV1FindNeighborsRequest) *ProjectsLocationsIndexEndpointsFindNeighborsCall { - c := &ProjectsLocationsIndexEndpointsFindNeighborsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1findneighborsrequest = googlecloudaiplatformv1findneighborsrequest +// - index: The name of the Index resource to be updated. Format: +// `projects/{project}/locations/{location}/indexes/{index}`. +func (r *ProjectsLocationsIndexesService) RemoveDatapoints(index string, googlecloudaiplatformv1removedatapointsrequest *GoogleCloudAiplatformV1RemoveDatapointsRequest) *ProjectsLocationsIndexesRemoveDatapointsCall { + c := &ProjectsLocationsIndexesRemoveDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.index = index + c.googlecloudaiplatformv1removedatapointsrequest = googlecloudaiplatformv1removedatapointsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsFindNeighborsCall { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesRemoveDatapointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsFindNeighborsCall { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexesRemoveDatapointsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Header() http.Header { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1findneighborsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1removedatapointsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:findNeighbors") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+index}:removeDatapoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66175,18 +69153,18 @@ func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "indexEndpoint": c.indexEndpoint, + "index": c.index, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.findNeighbors" call. +// Do executes the "aiplatform.projects.locations.indexes.removeDatapoints" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FindNeighborsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1RemoveDatapointsResponse.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 *ProjectsLocationsIndexEndpointsFindNeighborsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FindNeighborsResponse, error) { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RemoveDatapointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66205,7 +69183,7 @@ func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FindNeighborsResponse{ + ret := &GoogleCloudAiplatformV1RemoveDatapointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66218,84 +69196,78 @@ func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsIndexEndpointsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesUpsertDatapointsCall struct { + s *Service + index string + googlecloudaiplatformv1upsertdatapointsrequest *GoogleCloudAiplatformV1UpsertDatapointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an IndexEndpoint. +// UpsertDatapoints: Add/update Datapoints into an Index. // -// - name: The name of the IndexEndpoint resource. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) Get(name string) *ProjectsLocationsIndexEndpointsGetCall { - c := &ProjectsLocationsIndexEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - index: The name of the Index resource to be updated. Format: +// `projects/{project}/locations/{location}/indexes/{index}`. +func (r *ProjectsLocationsIndexesService) UpsertDatapoints(index string, googlecloudaiplatformv1upsertdatapointsrequest *GoogleCloudAiplatformV1UpsertDatapointsRequest) *ProjectsLocationsIndexesUpsertDatapointsCall { + c := &ProjectsLocationsIndexesUpsertDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.index = index + c.googlecloudaiplatformv1upsertdatapointsrequest = googlecloudaiplatformv1upsertdatapointsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsGetCall { +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesUpsertDatapointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsIndexEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsGetCall { +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexesUpsertDatapointsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsGetCall) Header() http.Header { +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1upsertdatapointsrequest) + if err != nil { + return nil, err } - var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+index}:upsertDatapoints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "index": c.index, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.get" call. +// Do executes the "aiplatform.projects.locations.indexes.upsertDatapoints" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1IndexEndpoint.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1UpsertDatapointsResponse.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 *ProjectsLocationsIndexEndpointsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1IndexEndpoint, error) { +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1UpsertDatapointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66314,7 +69286,7 @@ func (c *ProjectsLocationsIndexEndpointsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1IndexEndpoint{ + ret := &GoogleCloudAiplatformV1UpsertDatapointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66327,122 +69299,79 @@ func (c *ProjectsLocationsIndexEndpointsGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsIndexEndpointsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists IndexEndpoints in a Location. +// 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 from which to list the -// IndexEndpoints. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsIndexEndpointsService) List(parent string) *ProjectsLocationsIndexEndpointsListCall { - c := &ProjectsLocationsIndexEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `index_endpoint` supports = and !=. `index_endpoint` represents -// the IndexEndpoint ID, ie. the last segment of the IndexEndpoint's -// resourcename. * `display_name` supports =, != and regex() (uses re2 -// (https://github.com/google/re2/wiki/Syntax) syntax) * `labels` supports -// general map functions that is: `labels.key=value` - key:value equality -// `labels.key:* or labels:key - key existence A key including a space must be -// quoted. `labels."a key". Some examples: * `index_endpoint="1" * -// `display_name="myDisplayName" * `regex(display_name, "^A") -> The display -// name starts with an A. * `labels.myKey="myValue" -func (c *ProjectsLocationsIndexEndpointsListCall) Filter(filter string) *ProjectsLocationsIndexEndpointsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsIndexEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexEndpointsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListIndexEndpointsResponse.next_page_token of -// the previous IndexEndpointService.ListIndexEndpoints call. -func (c *ProjectsLocationsIndexEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsIndexEndpointsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsIndexEndpointsListCall) ReadMask(readMask string) *ProjectsLocationsIndexEndpointsListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsIndexesOperationsService) Cancel(name string) *ProjectsLocationsIndexesOperationsCancelCall { + c := &ProjectsLocationsIndexesOperationsCancelCall{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 // details. -func (c *ProjectsLocationsIndexEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsListCall { +func (c *ProjectsLocationsIndexesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsIndexEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsListCall { +func (c *ProjectsLocationsIndexesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/indexEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.list" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListIndexEndpointsResponse.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 *ProjectsLocationsIndexEndpointsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListIndexEndpointsResponse, error) { +// *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 *ProjectsLocationsIndexesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66461,7 +69390,7 @@ func (c *ProjectsLocationsIndexEndpointsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListIndexEndpointsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66474,101 +69403,74 @@ func (c *ProjectsLocationsIndexEndpointsListCall) Do(opts ...googleapi.CallOptio return ret, nil } -// 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 *ProjectsLocationsIndexEndpointsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListIndexEndpointsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsIndexEndpointsMutateDeployedIndexCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1deployedindex *GoogleCloudAiplatformV1DeployedIndex - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MutateDeployedIndex: Update an existing DeployedIndex under an -// IndexEndpoint. +// 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`. // -// - indexEndpoint: The name of the IndexEndpoint resource into which to deploy -// an Index. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) MutateDeployedIndex(indexEndpoint string, googlecloudaiplatformv1deployedindex *GoogleCloudAiplatformV1DeployedIndex) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { - c := &ProjectsLocationsIndexEndpointsMutateDeployedIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1deployedindex = googlecloudaiplatformv1deployedindex +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsIndexesOperationsService) Delete(name string) *ProjectsLocationsIndexesOperationsDeleteCall { + c := &ProjectsLocationsIndexesOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { +func (c *ProjectsLocationsIndexesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { +func (c *ProjectsLocationsIndexesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsIndexesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deployedindex) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:mutateDeployedIndex") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "indexEndpoint": c.indexEndpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.mutateDeployedIndex" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.delete" call. // 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 *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsIndexesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66587,7 +69489,7 @@ func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Do(opts ...goog 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, @@ -66600,67 +69502,68 @@ func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsIndexEndpointsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an IndexEndpoint. +// 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: Output only. The resource name of the IndexEndpoint. -func (r *ProjectsLocationsIndexEndpointsService) Patch(name string, googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint) *ProjectsLocationsIndexEndpointsPatchCall { - c := &ProjectsLocationsIndexEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsIndexesOperationsService) Get(name string) *ProjectsLocationsIndexesOperationsGetCall { + c := &ProjectsLocationsIndexesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1indexendpoint = googlecloudaiplatformv1indexendpoint - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. See google.protobuf.FieldMask. -func (c *ProjectsLocationsIndexEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsIndexEndpointsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsPatchCall { +func (c *ProjectsLocationsIndexesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsIndexesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsPatchCall { +func (c *ProjectsLocationsIndexesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsPatchCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1indexendpoint) - if err != nil { - return nil, err +func (c *ProjectsLocationsIndexesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -66671,13 +69574,13 @@ func (c *ProjectsLocationsIndexEndpointsPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.patch" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1IndexEndpoint.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsIndexEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1IndexEndpoint, error) { +func (c *ProjectsLocationsIndexesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66696,7 +69599,7 @@ func (c *ProjectsLocationsIndexEndpointsPatchCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1IndexEndpoint{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66709,79 +69612,104 @@ func (c *ProjectsLocationsIndexEndpointsPatchCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsIndexEndpointsReadIndexDatapointsCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1readindexdatapointsrequest *GoogleCloudAiplatformV1ReadIndexDatapointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ReadIndexDatapoints: Reads the datapoints/vectors of the given IDs. A -// maximum of 1000 datapoints can be retrieved in a batch. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - indexEndpoint: The name of the index endpoint. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) ReadIndexDatapoints(indexEndpoint string, googlecloudaiplatformv1readindexdatapointsrequest *GoogleCloudAiplatformV1ReadIndexDatapointsRequest) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { - c := &ProjectsLocationsIndexEndpointsReadIndexDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1readindexdatapointsrequest = googlecloudaiplatformv1readindexdatapointsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsIndexesOperationsService) List(name string) *ProjectsLocationsIndexesOperationsListCall { + c := &ProjectsLocationsIndexesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsIndexesOperationsListCall) Filter(filter string) *ProjectsLocationsIndexesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsIndexesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsIndexesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIndexesOperationsListCall { + 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 // details. -func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { +func (c *ProjectsLocationsIndexesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsIndexesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { +func (c *ProjectsLocationsIndexesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1readindexdatapointsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsIndexesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+indexEndpoint}:readIndexDatapoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "indexEndpoint": c.indexEndpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.readIndexDatapoints" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ReadIndexDatapointsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadIndexDatapointsResponse, error) { +func (c *ProjectsLocationsIndexesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66800,7 +69728,7 @@ func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ReadIndexDatapointsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66813,61 +69741,90 @@ func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsIndexEndpointsUndeployIndexCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1undeployindexrequest *GoogleCloudAiplatformV1UndeployIndexRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsIndexesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// UndeployIndex: Undeploys an Index from an IndexEndpoint, removing a -// DeployedIndex from it, and freeing all resources it's using. +type ProjectsLocationsIndexesOperationsWaitCall 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. // -// - indexEndpoint: The name of the IndexEndpoint resource from which to -// undeploy an Index. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) UndeployIndex(indexEndpoint string, googlecloudaiplatformv1undeployindexrequest *GoogleCloudAiplatformV1UndeployIndexRequest) *ProjectsLocationsIndexEndpointsUndeployIndexCall { - c := &ProjectsLocationsIndexEndpointsUndeployIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1undeployindexrequest = googlecloudaiplatformv1undeployindexrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsIndexesOperationsService) Wait(name string) *ProjectsLocationsIndexesOperationsWaitCall { + c := &ProjectsLocationsIndexesOperationsWaitCall{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 *ProjectsLocationsIndexesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsIndexesOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsUndeployIndexCall { +func (c *ProjectsLocationsIndexesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsUndeployIndexCall { +func (c *ProjectsLocationsIndexesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsIndexesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1undeployindexrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:undeployIndex") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66875,18 +69832,18 @@ func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "indexEndpoint": c.indexEndpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.undeployIndex" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.wait" call. // 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 *ProjectsLocationsIndexEndpointsUndeployIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66918,60 +69875,72 @@ func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsIndexEndpointsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1metadatastore *GoogleCloudAiplatformV1MetadataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + 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`. +// Create: Initializes a MetadataStore, including allocation of resources. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsIndexEndpointsOperationsService) Cancel(name string) *ProjectsLocationsIndexEndpointsOperationsCancelCall { - c := &ProjectsLocationsIndexEndpointsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location where the MetadataStore should +// be created. Format: `projects/{project}/locations/{location}/`. +func (r *ProjectsLocationsMetadataStoresService) Create(parent string, googlecloudaiplatformv1metadatastore *GoogleCloudAiplatformV1MetadataStore) *ProjectsLocationsMetadataStoresCreateCall { + c := &ProjectsLocationsMetadataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1metadatastore = googlecloudaiplatformv1metadatastore + return c +} + +// MetadataStoreId sets the optional parameter "metadataStoreId": The +// {metadatastore} portion of the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If +// not provided, the MetadataStore's ID will be a UUID generated by the +// service. Must be 4-128 characters in length. Valid characters are `/a-z-/`. +// Must be unique across all MetadataStores in the parent Location. (Otherwise +// the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the +// caller can't view the preexisting MetadataStore.) +func (c *ProjectsLocationsMetadataStoresCreateCall) MetadataStoreId(metadataStoreId string) *ProjectsLocationsMetadataStoresCreateCall { + c.urlParams_.Set("metadataStoreId", metadataStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsMetadataStoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1metadatastore) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66979,18 +69948,18 @@ func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.create" call. // 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 *ProjectsLocationsIndexEndpointsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsMetadataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67009,7 +69978,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Do(opts ...googlea 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, @@ -67022,7 +69991,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsIndexEndpointsOperationsDeleteCall struct { +type ProjectsLocationsMetadataStoresDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -67030,42 +69999,48 @@ type ProjectsLocationsIndexEndpointsOperationsDeleteCall struct { 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`. +// Delete: Deletes a single MetadataStore and all its child resources +// (Artifacts, Executions, and Contexts). // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsIndexEndpointsOperationsService) Delete(name string) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { - c := &ProjectsLocationsIndexEndpointsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the MetadataStore to delete. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresService) Delete(name string) *ProjectsLocationsMetadataStoresDeleteCall { + c := &ProjectsLocationsMetadataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Force sets the optional parameter "force": Deprecated: Field is no longer +// supported. +func (c *ProjectsLocationsMetadataStoresDeleteCall) Force(force bool) *ProjectsLocationsMetadataStoresDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -67083,13 +70058,13 @@ func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.delete" call. // 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 *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsMetadataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67108,7 +70083,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Do(opts ...googlea 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, @@ -67121,7 +70096,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsIndexEndpointsOperationsGetCall struct { +type ProjectsLocationsMetadataStoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -67130,13 +70105,12 @@ type ProjectsLocationsIndexEndpointsOperationsGetCall struct { 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. +// Get: Retrieves a specific MetadataStore. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsIndexEndpointsOperationsService) Get(name string) *ProjectsLocationsIndexEndpointsOperationsGetCall { - c := &ProjectsLocationsIndexEndpointsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the MetadataStore to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresService) Get(name string) *ProjectsLocationsMetadataStoresGetCall { + c := &ProjectsLocationsMetadataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -67144,7 +70118,7 @@ func (r *ProjectsLocationsIndexEndpointsOperationsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67152,27 +70126,27 @@ func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67193,13 +70167,13 @@ func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.get" call. // 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 +// *GoogleCloudAiplatformV1MetadataStore.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 *ProjectsLocationsIndexEndpointsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67218,7 +70192,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1MetadataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67231,41 +70205,39 @@ func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsIndexEndpointsOperationsListCall struct { +type ProjectsLocationsMetadataStoresListCall struct { s *Service - name string + parent 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`. +// List: Lists MetadataStores for a Location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsIndexEndpointsOperationsService) List(name string) *ProjectsLocationsIndexEndpointsOperationsListCall { - c := &ProjectsLocationsIndexEndpointsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Filter(filter string) *ProjectsLocationsIndexEndpointsOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The Location whose MetadataStores should be listed. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsMetadataStoresService) List(parent string) *ProjectsLocationsMetadataStoresListCall { + c := &ProjectsLocationsMetadataStoresListCall{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 *ProjectsLocationsIndexEndpointsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexEndpointsOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// Metadata Stores to return. The service may return fewer. Must be in range +// 1-1000, inclusive. Defaults to 100. +func (c *ProjectsLocationsMetadataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIndexEndpointsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous MetadataService.ListMetadataStores call. Provide this to +// retrieve the subsequent page. When paginating, all other provided parameters +// must match the call that provided the page token. (Otherwise the request +// will fail with INVALID_ARGUMENT error.) +func (c *ProjectsLocationsMetadataStoresListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -67273,7 +70245,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67281,27 +70253,27 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Fields(s ...googleap // IfNoneMatch sets an 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. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67309,7 +70281,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -67317,18 +70289,18 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.list" call. // 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 +// *GoogleCloudAiplatformV1ListMetadataStoresResponse.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 *ProjectsLocationsIndexEndpointsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsMetadataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListMetadataStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67347,7 +70319,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListMetadataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67363,7 +70335,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Do(opts ...googleapi // 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 *ProjectsLocationsIndexEndpointsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListMetadataStoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -67381,172 +70353,73 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Pages(ctx context.Co } } -type ProjectsLocationsIndexEndpointsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact + 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. +// Create: Creates an Artifact associated with a MetadataStore. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsIndexEndpointsOperationsService) Wait(name string) *ProjectsLocationsIndexEndpointsOperationsWaitCall { - c := &ProjectsLocationsIndexEndpointsOperationsWaitCall{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 *ProjectsLocationsIndexEndpointsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsIndexEndpointsOperationsWaitCall { - 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 -// details. -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsWaitCall { - c.ctx_ = ctx +// - parent: The resource name of the MetadataStore where the Artifact should +// be created. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Create(parent string, googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact) *ProjectsLocationsMetadataStoresArtifactsCreateCall { + c := &ProjectsLocationsMetadataStoresArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1artifact = googlecloudaiplatformv1artifact return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.indexEndpoints.operations.wait" call. -// 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 *ProjectsLocationsIndexEndpointsOperationsWaitCall) 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 -} - -type ProjectsLocationsIndexesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an Index. -// -// - parent: The resource name of the Location to create the Index in. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsIndexesService) Create(parent string, googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index) *ProjectsLocationsIndexesCreateCall { - c := &ProjectsLocationsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1index = googlecloudaiplatformv1index +// ArtifactId sets the optional parameter "artifactId": The {artifact} portion +// of the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artif +// acts/{artifact}` If not provided, the Artifact's ID will be a UUID generated +// by the service. Must be 4-128 characters in length. Valid characters are +// `/a-z-/`. Must be unique across all Artifacts in the parent MetadataStore. +// (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED +// if the caller can't view the preexisting Artifact.) +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsMetadataStoresArtifactsCreateCall { + c.urlParams_.Set("artifactId", artifactId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesCreateCall { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesCreateCall) Context(ctx context.Context) *ProjectsLocationsIndexesCreateCall { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1index) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1artifact) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -67559,13 +70432,13 @@ func (c *ProjectsLocationsIndexesCreateCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.create" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Artifact.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 *ProjectsLocationsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67584,7 +70457,7 @@ func (c *ProjectsLocationsIndexesCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Artifact{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67597,7 +70470,7 @@ func (c *ProjectsLocationsIndexesCreateCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsIndexesDeleteCall struct { +type ProjectsLocationsMetadataStoresArtifactsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -67605,41 +70478,49 @@ type ProjectsLocationsIndexesDeleteCall struct { header_ http.Header } -// Delete: Deletes an Index. An Index can only be deleted when all its -// DeployedIndexes had been undeployed. +// Delete: Deletes an Artifact. // -// - name: The name of the Index resource to be deleted. Format: -// `projects/{project}/locations/{location}/indexes/{index}`. -func (r *ProjectsLocationsIndexesService) Delete(name string) *ProjectsLocationsIndexesDeleteCall { - c := &ProjectsLocationsIndexesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Artifact to delete. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art +// ifacts/{artifact}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Delete(name string) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { + c := &ProjectsLocationsMetadataStoresArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Etag sets the optional parameter "etag": The etag of the Artifact to delete. +// If this is provided, it must match the server's etag. Otherwise, the request +// will fail with a FAILED_PRECONDITION. +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexesDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -67657,13 +70538,13 @@ func (c *ProjectsLocationsIndexesDeleteCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.delete" call. // 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 *ProjectsLocationsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67695,7 +70576,7 @@ func (c *ProjectsLocationsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsIndexesGetCall struct { +type ProjectsLocationsMetadataStoresArtifactsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -67704,12 +70585,13 @@ type ProjectsLocationsIndexesGetCall struct { header_ http.Header } -// Get: Gets an Index. +// Get: Retrieves a specific Artifact. // -// - name: The name of the Index resource. Format: -// `projects/{project}/locations/{location}/indexes/{index}`. -func (r *ProjectsLocationsIndexesService) Get(name string) *ProjectsLocationsIndexesGetCall { - c := &ProjectsLocationsIndexesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Artifact to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art +// ifacts/{artifact}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Get(name string) *ProjectsLocationsMetadataStoresArtifactsGetCall { + c := &ProjectsLocationsMetadataStoresArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -67717,7 +70599,7 @@ func (r *ProjectsLocationsIndexesService) Get(name string) *ProjectsLocationsInd // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesGetCall { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67725,27 +70607,27 @@ func (c *ProjectsLocationsIndexesGetCall) Fields(s ...googleapi.Field) *Projects // IfNoneMatch sets an 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. -func (c *ProjectsLocationsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesGetCall { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesGetCall) Context(ctx context.Context) *ProjectsLocationsIndexesGetCall { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67766,13 +70648,13 @@ func (c *ProjectsLocationsIndexesGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Index.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Artifact.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 *ProjectsLocationsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Index, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67791,7 +70673,7 @@ func (c *ProjectsLocationsIndexesGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Index{ + ret := &GoogleCloudAiplatformV1Artifact{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67804,7 +70686,7 @@ func (c *ProjectsLocationsIndexesGetCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -type ProjectsLocationsIndexesListCall struct { +type ProjectsLocationsMetadataStoresArtifactsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -67813,48 +70695,74 @@ type ProjectsLocationsIndexesListCall struct { header_ http.Header } -// List: Lists Indexes in a Location. +// List: Lists Artifacts in the MetadataStore. // -// - parent: The resource name of the Location from which to list the Indexes. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsIndexesService) List(parent string) *ProjectsLocationsIndexesListCall { - c := &ProjectsLocationsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The MetadataStore whose Artifacts should be listed. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) List(parent string) *ProjectsLocationsMetadataStoresArtifactsListCall { + c := &ProjectsLocationsMetadataStoresArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsIndexesListCall) Filter(filter string) *ProjectsLocationsIndexesListCall { +// Filter sets the optional parameter "filter": Filter specifying the boolean +// condition for the Artifacts to satisfy in order to be part of the result +// set. The syntax to define filter query is based on +// https://google.aip.dev/160. The supported set of filters include the +// following: * **Attribute filtering**: For example: `display_name = "test". +// Supported fields include: `name`, `display_name`, `uri`, `state`, +// `schema_title`, `create_time`, and `update_time`. Time fields, such as +// `create_time` and `update_time`, require values specified in RFC-3339 +// format. For example: `create_time = "2020-11-19T11:30:00-04:00" * +// **Metadata field**: To filter on metadata fields use traversal operation as +// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0` +// In case the field name contains special characters (such as colon), one can +// embed it inside double quote. For example: `metadata."field:1".number_value +// = 10.0` * **Context based filtering**: To filter Artifacts based on the +// contexts to which they belong, use the function operator with the full +// resource name `in_context()`. For example: +// `in_context("projects//locations//metadataStores//contexts/")` Each of the +// above supported filter types can be combined together using logical +// operators (`AND` & `OR`). Maximum nested expression depth allowed is 5. For +// example: `display_name = "test" AND metadata.field1.bool_value = true`. +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsIndexesListCall) PageSize(pageSize int64) *ProjectsLocationsIndexesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// OrderBy sets the optional parameter "orderBy": How the list of messages is +// ordered. Specify the values to order by and an ordering operation. The +// default sorting order is ascending. To specify descending order for a field, +// users append a " desc" suffix; for example: "foo desc, bar". Subfields are +// specified with a `.` character, such as foo.bar. see +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresArtifactsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListIndexesResponse.next_page_token of the -// previous IndexService.ListIndexes call. -func (c *ProjectsLocationsIndexesListCall) PageToken(pageToken string) *ProjectsLocationsIndexesListCall { - c.urlParams_.Set("pageToken", pageToken) +// PageSize sets the optional parameter "pageSize": The maximum number of +// Artifacts to return. The service may return fewer. Must be in range 1-1000, +// inclusive. Defaults to 100. +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresArtifactsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsIndexesListCall) ReadMask(readMask string) *ProjectsLocationsIndexesListCall { - c.urlParams_.Set("readMask", readMask) +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous MetadataService.ListArtifacts call. Provide this to retrieve +// the subsequent page. When paginating, all other provided parameters must +// match the call that provided the page token. (Otherwise the request will +// fail with INVALID_ARGUMENT error.) +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresArtifactsListCall { + 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 // details. -func (c *ProjectsLocationsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67862,27 +70770,27 @@ func (c *ProjectsLocationsIndexesListCall) Fields(s ...googleapi.Field) *Project // IfNoneMatch sets an 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. -func (c *ProjectsLocationsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesListCall) Context(ctx context.Context) *ProjectsLocationsIndexesListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67890,7 +70798,7 @@ func (c *ProjectsLocationsIndexesListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -67903,13 +70811,13 @@ func (c *ProjectsLocationsIndexesListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListIndexesResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ListArtifactsResponse.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 *ProjectsLocationsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListIndexesResponse, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListArtifactsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67928,7 +70836,7 @@ func (c *ProjectsLocationsIndexesListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListIndexesResponse{ + ret := &GoogleCloudAiplatformV1ListArtifactsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67944,7 +70852,7 @@ func (c *ProjectsLocationsIndexesListCall) Do(opts ...googleapi.CallOption) (*Go // 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 *ProjectsLocationsIndexesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListIndexesResponse) error) error { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListArtifactsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -67962,29 +70870,35 @@ func (c *ProjectsLocationsIndexesListCall) Pages(ctx context.Context, f func(*Go } } -type ProjectsLocationsIndexesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a stored Artifact. +// +// - name: Output only. The resource name of the Artifact. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Patch(name string, googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact) *ProjectsLocationsMetadataStoresArtifactsPatchCall { + c := &ProjectsLocationsMetadataStoresArtifactsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1artifact = googlecloudaiplatformv1artifact + return c } -// Patch: Updates an Index. -// -// - name: Output only. The resource name of the Index. -func (r *ProjectsLocationsIndexesService) Patch(name string, googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index) *ProjectsLocationsIndexesPatchCall { - c := &ProjectsLocationsIndexesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1index = googlecloudaiplatformv1index +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Artifact is not found, a new Artifact is created. +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresArtifactsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// UpdateMask sets the optional parameter "updateMask": The update mask applies -// to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. -func (c *ProjectsLocationsIndexesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsIndexesPatchCall { +// UpdateMask sets the optional parameter "updateMask": A FieldMask indicating +// which fields should be updated. +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresArtifactsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -67992,30 +70906,30 @@ func (c *ProjectsLocationsIndexesPatchCall) UpdateMask(updateMask string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesPatchCall { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesPatchCall) Context(ctx context.Context) *ProjectsLocationsIndexesPatchCall { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesPatchCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1index) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1artifact) if err != nil { return nil, err } @@ -68034,13 +70948,13 @@ func (c *ProjectsLocationsIndexesPatchCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.patch" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Artifact.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 *ProjectsLocationsIndexesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68059,7 +70973,7 @@ func (c *ProjectsLocationsIndexesPatchCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Artifact{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68072,59 +70986,59 @@ func (c *ProjectsLocationsIndexesPatchCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsIndexesRemoveDatapointsCall struct { - s *Service - index string - googlecloudaiplatformv1removedatapointsrequest *GoogleCloudAiplatformV1RemoveDatapointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsPurgeCall struct { + s *Service + parent string + googlecloudaiplatformv1purgeartifactsrequest *GoogleCloudAiplatformV1PurgeArtifactsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveDatapoints: Remove Datapoints from an Index. +// Purge: Purges Artifacts. // -// - index: The name of the Index resource to be updated. Format: -// `projects/{project}/locations/{location}/indexes/{index}`. -func (r *ProjectsLocationsIndexesService) RemoveDatapoints(index string, googlecloudaiplatformv1removedatapointsrequest *GoogleCloudAiplatformV1RemoveDatapointsRequest) *ProjectsLocationsIndexesRemoveDatapointsCall { - c := &ProjectsLocationsIndexesRemoveDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.index = index - c.googlecloudaiplatformv1removedatapointsrequest = googlecloudaiplatformv1removedatapointsrequest +// - parent: The metadata store to purge Artifacts from. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Purge(parent string, googlecloudaiplatformv1purgeartifactsrequest *GoogleCloudAiplatformV1PurgeArtifactsRequest) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { + c := &ProjectsLocationsMetadataStoresArtifactsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1purgeartifactsrequest = googlecloudaiplatformv1purgeartifactsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesRemoveDatapointsCall { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexesRemoveDatapointsCall { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesRemoveDatapointsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1removedatapointsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgeartifactsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+index}:removeDatapoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -68132,18 +71046,18 @@ func (c *ProjectsLocationsIndexesRemoveDatapointsCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "index": c.index, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.removeDatapoints" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RemoveDatapointsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsIndexesRemoveDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RemoveDatapointsResponse, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68162,7 +71076,7 @@ func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1RemoveDatapointsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68175,78 +71089,122 @@ func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsIndexesUpsertDatapointsCall struct { - s *Service - index string - googlecloudaiplatformv1upsertdatapointsrequest *GoogleCloudAiplatformV1UpsertDatapointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall struct { + s *Service + artifact string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpsertDatapoints: Add/update Datapoints into an Index. +// QueryArtifactLineageSubgraph: Retrieves lineage of an Artifact represented +// through Artifacts and Executions connected by Event edges and returned as a +// LineageSubgraph. // -// - index: The name of the Index resource to be updated. Format: -// `projects/{project}/locations/{location}/indexes/{index}`. -func (r *ProjectsLocationsIndexesService) UpsertDatapoints(index string, googlecloudaiplatformv1upsertdatapointsrequest *GoogleCloudAiplatformV1UpsertDatapointsRequest) *ProjectsLocationsIndexesUpsertDatapointsCall { - c := &ProjectsLocationsIndexesUpsertDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.index = index - c.googlecloudaiplatformv1upsertdatapointsrequest = googlecloudaiplatformv1upsertdatapointsrequest +// - artifact: The resource name of the Artifact whose Lineage needs to be +// retrieved as a LineageSubgraph. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art +// ifacts/{artifact}` The request may error with FAILED_PRECONDITION if the +// number of Artifacts, the number of Executions, or the number of Events +// that would be returned for the Context exceeds 1000. +func (r *ProjectsLocationsMetadataStoresArtifactsService) QueryArtifactLineageSubgraph(artifact string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { + c := &ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.artifact = artifact + return c +} + +// Filter sets the optional parameter "filter": Filter specifying the boolean +// condition for the Artifacts to satisfy in order to be part of the Lineage +// Subgraph. The syntax to define filter query is based on +// https://google.aip.dev/160. The supported set of filters include the +// following: * **Attribute filtering**: For example: `display_name = "test" +// Supported fields include: `name`, `display_name`, `uri`, `state`, +// `schema_title`, `create_time`, and `update_time`. Time fields, such as +// `create_time` and `update_time`, require values specified in RFC-3339 +// format. For example: `create_time = "2020-11-19T11:30:00-04:00" * +// **Metadata field**: To filter on metadata fields use traversal operation as +// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0` +// In case the field name contains special characters (such as colon), one can +// embed it inside double quote. For example: `metadata."field:1".number_value +// = 10.0` Each of the above supported filter types can be combined together +// using logical operators (`AND` & `OR`). Maximum nested expression depth +// allowed is 5. For example: `display_name = "test" AND +// metadata.field1.bool_value = true`. +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxHops sets the optional parameter "maxHops": Specifies the size of the +// lineage graph in terms of number of hops from the specified artifact. +// Negative Value: INVALID_ARGUMENT error is returned 0: Only input artifact is +// returned. No value: Transitive closure is performed to return the complete +// graph. +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) MaxHops(maxHops int64) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { + c.urlParams_.Set("maxHops", fmt.Sprint(maxHops)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesUpsertDatapointsCall { +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexesUpsertDatapointsCall { +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1upsertdatapointsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+index}:upsertDatapoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+artifact}:queryArtifactLineageSubgraph") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "index": c.index, + "artifact": c.artifact, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.upsertDatapoints" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.queryArtifactLineageSubgraph" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1UpsertDatapointsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1LineageSubgraph.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 *ProjectsLocationsIndexesUpsertDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1UpsertDatapointsResponse, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68265,7 +71223,7 @@ func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1UpsertDatapointsResponse{ + ret := &GoogleCloudAiplatformV1LineageSubgraph{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68278,7 +71236,7 @@ func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsIndexesOperationsCancelCall struct { +type ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -68297,8 +71255,8 @@ type ProjectsLocationsIndexesOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsIndexesOperationsService) Cancel(name string) *ProjectsLocationsIndexesOperationsCancelCall { - c := &ProjectsLocationsIndexesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -68306,27 +71264,27 @@ func (r *ProjectsLocationsIndexesOperationsService) Cancel(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -68344,13 +71302,13 @@ func (c *ProjectsLocationsIndexesOperationsCancelCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.cancel" call. // 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 *ProjectsLocationsIndexesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68382,7 +71340,7 @@ func (c *ProjectsLocationsIndexesOperationsCancelCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsIndexesOperationsDeleteCall struct { +type ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -68396,8 +71354,8 @@ type ProjectsLocationsIndexesOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsIndexesOperationsService) Delete(name string) *ProjectsLocationsIndexesOperationsDeleteCall { - c := &ProjectsLocationsIndexesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -68405,27 +71363,27 @@ func (r *ProjectsLocationsIndexesOperationsService) Delete(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -68443,13 +71401,13 @@ func (c *ProjectsLocationsIndexesOperationsDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.delete" call. // 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 *ProjectsLocationsIndexesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68481,7 +71439,7 @@ func (c *ProjectsLocationsIndexesOperationsDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsIndexesOperationsGetCall struct { +type ProjectsLocationsMetadataStoresArtifactsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -68495,145 +71453,16 @@ type ProjectsLocationsIndexesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsIndexesOperationsService) Get(name string) *ProjectsLocationsIndexesOperationsGetCall { - c := &ProjectsLocationsIndexesOperationsGetCall{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 -// details. -func (c *ProjectsLocationsIndexesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsIndexesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsIndexesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsIndexesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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.indexes.operations.get" call. -// 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 *ProjectsLocationsIndexesOperationsGetCall) 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 -} - -type ProjectsLocationsIndexesOperationsListCall 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 *ProjectsLocationsIndexesOperationsService) List(name string) *ProjectsLocationsIndexesOperationsListCall { - c := &ProjectsLocationsIndexesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsIndexesOperationsListCall) Filter(filter string) *ProjectsLocationsIndexesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsIndexesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsIndexesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIndexesOperationsListCall { - 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 // details. -func (c *ProjectsLocationsIndexesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68641,171 +71470,37 @@ func (c *ProjectsLocationsIndexesOperationsListCall) Fields(s ...googleapi.Field // IfNoneMatch sets an 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. -func (c *ProjectsLocationsIndexesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesOperationsListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsIndexesOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsIndexesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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.indexes.operations.list" call. -// 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 *ProjectsLocationsIndexesOperationsListCall) 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 -} - -// 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 *ProjectsLocationsIndexesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsIndexesOperationsWaitCall 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 *ProjectsLocationsIndexesOperationsService) Wait(name string) *ProjectsLocationsIndexesOperationsWaitCall { - c := &ProjectsLocationsIndexesOperationsWaitCall{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 *ProjectsLocationsIndexesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsIndexesOperationsWaitCall { - 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 -// details. -func (c *ProjectsLocationsIndexesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsWaitCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -68816,13 +71511,13 @@ func (c *ProjectsLocationsIndexesOperationsWaitCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.operations.wait" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.get" call. // 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 *ProjectsLocationsIndexesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68854,91 +71549,104 @@ func (c *ProjectsLocationsIndexesOperationsWaitCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsMetadataStoresCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1metadatastore *GoogleCloudAiplatformV1MetadataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Initializes a MetadataStore, including allocation of resources. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Location where the MetadataStore should -// be created. Format: `projects/{project}/locations/{location}/`. -func (r *ProjectsLocationsMetadataStoresService) Create(parent string, googlecloudaiplatformv1metadatastore *GoogleCloudAiplatformV1MetadataStore) *ProjectsLocationsMetadataStoresCreateCall { - c := &ProjectsLocationsMetadataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1metadatastore = googlecloudaiplatformv1metadatastore +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) List(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// MetadataStoreId sets the optional parameter "metadataStoreId": The -// {metadatastore} portion of the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If -// not provided, the MetadataStore's ID will be a UUID generated by the -// service. Must be 4-128 characters in length. Valid characters are `/a-z-/`. -// Must be unique across all MetadataStores in the parent Location. (Otherwise -// the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the -// caller can't view the preexisting MetadataStore.) -func (c *ProjectsLocationsMetadataStoresCreateCall) MetadataStoreId(metadataStoreId string) *ProjectsLocationsMetadataStoresCreateCall { - c.urlParams_.Set("metadataStoreId", metadataStoreId) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + 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 // details. -func (c *ProjectsLocationsMetadataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresCreateCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresCreateCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1metadatastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+parent}/metadataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.create" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.list" call. // 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 +// *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 *ProjectsLocationsMetadataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68957,7 +71665,7 @@ func (c *ProjectsLocationsMetadataStoresCreateCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68970,7 +71678,28 @@ func (c *ProjectsLocationsMetadataStoresCreateCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsMetadataStoresDeleteCall struct { +// 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 *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -68978,55 +71707,63 @@ type ProjectsLocationsMetadataStoresDeleteCall struct { header_ http.Header } -// Delete: Deletes a single MetadataStore and all its child resources -// (Artifacts, Executions, and Contexts). +// 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 resource name of the MetadataStore to delete. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresService) Delete(name string) *ProjectsLocationsMetadataStoresDeleteCall { - c := &ProjectsLocationsMetadataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": Deprecated: Field is no longer -// supported. -func (c *ProjectsLocationsMetadataStoresDeleteCall) Force(force bool) *ProjectsLocationsMetadataStoresDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) +// 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 *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsMetadataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -69037,13 +71774,13 @@ func (c *ProjectsLocationsMetadataStoresDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.wait" call. // 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 *ProjectsLocationsMetadataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69075,84 +71812,82 @@ func (c *ProjectsLocationsMetadataStoresDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsMetadataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall struct { + s *Service + context string + googlecloudaiplatformv1addcontextartifactsandexecutionsrequest *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a specific MetadataStore. +// AddContextArtifactsAndExecutions: Adds a set of Artifacts and Executions to +// a Context. If any of the Artifacts or Executions have already been added to +// a Context, they are simply skipped. // -// - name: The resource name of the MetadataStore to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresService) Get(name string) *ProjectsLocationsMetadataStoresGetCall { - c := &ProjectsLocationsMetadataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - context: The resource name of the Context that the Artifacts and +// Executions belong to. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) AddContextArtifactsAndExecutions(context string, googlecloudaiplatformv1addcontextartifactsandexecutionsrequest *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsRequest) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { + c := &ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.context = context + c.googlecloudaiplatformv1addcontextartifactsandexecutionsrequest = googlecloudaiplatformv1addcontextartifactsandexecutionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresGetCall { +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresGetCall { +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addcontextartifactsandexecutionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:addContextArtifactsAndExecutions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "context": c.context, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.addContextArtifactsAndExecutions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1MetadataStore.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 *ProjectsLocationsMetadataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataStore, error) { +// *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse.ServerRespon +// se.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 *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69171,7 +71906,7 @@ func (c *ProjectsLocationsMetadataStoresGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1MetadataStore{ + ret := &GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69184,102 +71919,83 @@ func (c *ProjectsLocationsMetadataStoresGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsMetadataStoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsAddContextChildrenCall struct { + s *Service + context string + googlecloudaiplatformv1addcontextchildrenrequest *GoogleCloudAiplatformV1AddContextChildrenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists MetadataStores for a Location. +// AddContextChildren: Adds a set of Contexts as children to a parent Context. +// If any of the child Contexts have already been added to the parent Context, +// they are simply skipped. If this call would create a cycle or cause any +// Context to have more than 10 parents, the request will fail with an +// INVALID_ARGUMENT error. // -// - parent: The Location whose MetadataStores should be listed. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsMetadataStoresService) List(parent string) *ProjectsLocationsMetadataStoresListCall { - c := &ProjectsLocationsMetadataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Metadata Stores to return. The service may return fewer. Must be in range -// 1-1000, inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListMetadataStores call. Provide this to -// retrieve the subsequent page. When paginating, all other provided parameters -// must match the call that provided the page token. (Otherwise the request -// will fail with INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// - context: The resource name of the parent Context. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) AddContextChildren(context string, googlecloudaiplatformv1addcontextchildrenrequest *GoogleCloudAiplatformV1AddContextChildrenRequest) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { + c := &ProjectsLocationsMetadataStoresContextsAddContextChildrenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.context = context + c.googlecloudaiplatformv1addcontextchildrenrequest = googlecloudaiplatformv1addcontextchildrenrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresListCall { +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresListCall { +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addcontextchildrenrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:addContextChildren") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "context": c.context, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.addContextChildren" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListMetadataStoresResponse.ServerResponse.Header or +// *GoogleCloudAiplatformV1AddContextChildrenResponse.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 *ProjectsLocationsMetadataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListMetadataStoresResponse, error) { +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddContextChildrenResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69298,7 +72014,7 @@ func (c *ProjectsLocationsMetadataStoresListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListMetadataStoresResponse{ + ret := &GoogleCloudAiplatformV1AddContextChildrenResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69311,94 +72027,73 @@ func (c *ProjectsLocationsMetadataStoresListCall) Do(opts ...googleapi.CallOptio return ret, nil } -// 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 *ProjectsLocationsMetadataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListMetadataStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsMetadataStoresArtifactsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Artifact associated with a MetadataStore. +// Create: Creates a Context associated with a MetadataStore. // -// - parent: The resource name of the MetadataStore where the Artifact should -// be created. Format: +// - parent: The resource name of the MetadataStore where the Context should be +// created. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Create(parent string, googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact) *ProjectsLocationsMetadataStoresArtifactsCreateCall { - c := &ProjectsLocationsMetadataStoresArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsService) Create(parent string, googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context) *ProjectsLocationsMetadataStoresContextsCreateCall { + c := &ProjectsLocationsMetadataStoresContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1artifact = googlecloudaiplatformv1artifact + c.googlecloudaiplatformv1context = googlecloudaiplatformv1context return c } -// ArtifactId sets the optional parameter "artifactId": The {artifact} portion -// of the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artif -// acts/{artifact}` If not provided, the Artifact's ID will be a UUID generated +// ContextId sets the optional parameter "contextId": The {context} portion of +// the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/conte +// xts/{context}`. If not provided, the Context's ID will be a UUID generated // by the service. Must be 4-128 characters in length. Valid characters are -// `/a-z-/`. Must be unique across all Artifacts in the parent MetadataStore. +// `/a-z-/`. Must be unique across all Contexts in the parent MetadataStore. // (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED -// if the caller can't view the preexisting Artifact.) -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsMetadataStoresArtifactsCreateCall { - c.urlParams_.Set("artifactId", artifactId) +// if the caller can't view the preexisting Context.) +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) ContextId(contextId string) *ProjectsLocationsMetadataStoresContextsCreateCall { + c.urlParams_.Set("contextId", contextId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsCreateCall { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsCreateCall { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1artifact) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1context) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -69411,13 +72106,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.create" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Context.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 *ProjectsLocationsMetadataStoresArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69436,7 +72131,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Artifact{ + ret := &GoogleCloudAiplatformV1Context{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69449,7 +72144,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsDeleteCall struct { +type ProjectsLocationsMetadataStoresContextsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -69457,49 +72152,56 @@ type ProjectsLocationsMetadataStoresArtifactsDeleteCall struct { header_ http.Header } -// Delete: Deletes an Artifact. +// Delete: Deletes a stored Context. // -// - name: The resource name of the Artifact to delete. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art -// ifacts/{artifact}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Delete(name string) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { - c := &ProjectsLocationsMetadataStoresArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Context to delete. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) Delete(name string) *ProjectsLocationsMetadataStoresContextsDeleteCall { + c := &ProjectsLocationsMetadataStoresContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Etag sets the optional parameter "etag": The etag of the Artifact to delete. +// Etag sets the optional parameter "etag": The etag of the Context to delete. // If this is provided, it must match the server's etag. Otherwise, the request // will fail with a FAILED_PRECONDITION. -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresContextsDeleteCall { c.urlParams_.Set("etag", etag) return c } +// Force sets the optional parameter "force": The force deletion semantics is +// still undefined. Users should not use this field. +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Force(force bool) *ProjectsLocationsMetadataStoresContextsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -69517,13 +72219,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.delete" call. // 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 *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69555,7 +72257,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsGetCall struct { +type ProjectsLocationsMetadataStoresContextsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -69564,13 +72266,13 @@ type ProjectsLocationsMetadataStoresArtifactsGetCall struct { header_ http.Header } -// Get: Retrieves a specific Artifact. +// Get: Retrieves a specific Context. // -// - name: The resource name of the Artifact to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art -// ifacts/{artifact}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Get(name string) *ProjectsLocationsMetadataStoresArtifactsGetCall { - c := &ProjectsLocationsMetadataStoresArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Context to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) Get(name string) *ProjectsLocationsMetadataStoresContextsGetCall { + c := &ProjectsLocationsMetadataStoresContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -69578,7 +72280,7 @@ func (r *ProjectsLocationsMetadataStoresArtifactsService) Get(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69586,27 +72288,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -69627,13 +72329,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Context.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 *ProjectsLocationsMetadataStoresArtifactsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69652,7 +72354,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Artifact{ + ret := &GoogleCloudAiplatformV1Context{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69665,7 +72367,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsListCall struct { +type ProjectsLocationsMetadataStoresContextsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -69674,37 +72376,36 @@ type ProjectsLocationsMetadataStoresArtifactsListCall struct { header_ http.Header } -// List: Lists Artifacts in the MetadataStore. +// List: Lists Contexts on the MetadataStore. // -// - parent: The MetadataStore whose Artifacts should be listed. Format: +// - parent: The MetadataStore whose Contexts should be listed. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) List(parent string) *ProjectsLocationsMetadataStoresArtifactsListCall { - c := &ProjectsLocationsMetadataStoresArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsService) List(parent string) *ProjectsLocationsMetadataStoresContextsListCall { + c := &ProjectsLocationsMetadataStoresContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter specifying the boolean -// condition for the Artifacts to satisfy in order to be part of the result -// set. The syntax to define filter query is based on -// https://google.aip.dev/160. The supported set of filters include the -// following: * **Attribute filtering**: For example: `display_name = "test". -// Supported fields include: `name`, `display_name`, `uri`, `state`, -// `schema_title`, `create_time`, and `update_time`. Time fields, such as -// `create_time` and `update_time`, require values specified in RFC-3339 -// format. For example: `create_time = "2020-11-19T11:30:00-04:00" * +// condition for the Contexts to satisfy in order to be part of the result set. +// The syntax to define filter query is based on https://google.aip.dev/160. +// Following are the supported set of filters: * **Attribute filtering**: For +// example: `display_name = "test". Supported fields include: `name`, +// `display_name`, `schema_title`, `create_time`, and `update_time`. Time +// fields, such as `create_time` and `update_time`, require values specified in +// RFC-3339 format. For example: `create_time = "2020-11-19T11:30:00-04:00". * // **Metadata field**: To filter on metadata fields use traversal operation as -// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0` +// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0`. // In case the field name contains special characters (such as colon), one can // embed it inside double quote. For example: `metadata."field:1".number_value -// = 10.0` * **Context based filtering**: To filter Artifacts based on the -// contexts to which they belong, use the function operator with the full -// resource name `in_context()`. For example: -// `in_context("projects//locations//metadataStores//contexts/")` Each of the -// above supported filter types can be combined together using logical -// operators (`AND` & `OR`). Maximum nested expression depth allowed is 5. For -// example: `display_name = "test" AND metadata.field1.bool_value = true`. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsListCall { +// = 10.0` * **Parent Child filtering**: To filter Contexts based on +// parent-child relationship use the HAS operator as follows: ``` +// parent_contexts: "projects//locations//metadataStores//contexts/" +// child_contexts: "projects//locations//metadataStores//contexts/" ``` Each of +// the above supported filters can be combined together using logical operators +// (`AND` & `OR`). Maximum nested expression depth allowed is 5. For example: +// `display_name = "test" AND metadata.field1.bool_value = true`. +func (c *ProjectsLocationsMetadataStoresContextsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("filter", filter) return c } @@ -69715,25 +72416,25 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Filter(filter string) // users append a " desc" suffix; for example: "foo desc, bar". Subfields are // specified with a `.` character, such as foo.bar. see // https://google.aip.dev/132#ordering for more details. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// Artifacts to return. The service may return fewer. Must be in range 1-1000, +// Contexts to return. The service may return fewer. Must be in range 1-1000, // inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListArtifacts call. Provide this to retrieve +// from a previous MetadataService.ListContexts call. Provide this to retrieve // the subsequent page. When paginating, all other provided parameters must // match the call that provided the page token. (Otherwise the request will // fail with INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -69741,7 +72442,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageToken(pageToken s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69749,27 +72450,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -69777,7 +72478,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -69790,13 +72491,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListArtifactsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ListContextsResponse.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 *ProjectsLocationsMetadataStoresArtifactsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListArtifactsResponse, error) { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListContextsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69815,7 +72516,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListArtifactsResponse{ + ret := &GoogleCloudAiplatformV1ListContextsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69831,7 +72532,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsMetadataStoresArtifactsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListArtifactsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListContextsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -69849,35 +72550,35 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Pages(ctx context.Con } } -type ProjectsLocationsMetadataStoresArtifactsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a stored Artifact. +// Patch: Updates a stored Context. // -// - name: Output only. The resource name of the Artifact. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Patch(name string, googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact) *ProjectsLocationsMetadataStoresArtifactsPatchCall { - c := &ProjectsLocationsMetadataStoresArtifactsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The resource name of the Context. +func (r *ProjectsLocationsMetadataStoresContextsService) Patch(name string, googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context) *ProjectsLocationsMetadataStoresContextsPatchCall { + c := &ProjectsLocationsMetadataStoresContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1artifact = googlecloudaiplatformv1artifact + c.googlecloudaiplatformv1context = googlecloudaiplatformv1context return c } // AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Artifact is not found, a new Artifact is created. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresArtifactsPatchCall { +// the Context is not found, a new Context is created. +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresContextsPatchCall { c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // UpdateMask sets the optional parameter "updateMask": A FieldMask indicating // which fields should be updated. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresArtifactsPatchCall { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresContextsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -69885,30 +72586,30 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) UpdateMask(updateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsPatchCall { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsPatchCall { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1artifact) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1context) if err != nil { return nil, err } @@ -69927,13 +72628,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.patch" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Context.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 *ProjectsLocationsMetadataStoresArtifactsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69952,7 +72653,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Artifact{ + ret := &GoogleCloudAiplatformV1Context{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69965,59 +72666,59 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsPurgeCall struct { - s *Service - parent string - googlecloudaiplatformv1purgeartifactsrequest *GoogleCloudAiplatformV1PurgeArtifactsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsPurgeCall struct { + s *Service + parent string + googlecloudaiplatformv1purgecontextsrequest *GoogleCloudAiplatformV1PurgeContextsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Purges Artifacts. +// Purge: Purges Contexts. // -// - parent: The metadata store to purge Artifacts from. Format: +// - parent: The metadata store to purge Contexts from. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Purge(parent string, googlecloudaiplatformv1purgeartifactsrequest *GoogleCloudAiplatformV1PurgeArtifactsRequest) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { - c := &ProjectsLocationsMetadataStoresArtifactsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsService) Purge(parent string, googlecloudaiplatformv1purgecontextsrequest *GoogleCloudAiplatformV1PurgeContextsRequest) *ProjectsLocationsMetadataStoresContextsPurgeCall { + c := &ProjectsLocationsMetadataStoresContextsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1purgeartifactsrequest = googlecloudaiplatformv1purgeartifactsrequest + c.googlecloudaiplatformv1purgecontextsrequest = googlecloudaiplatformv1purgecontextsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgeartifactsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgecontextsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70030,13 +72731,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.purge" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.purge" call. // 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 *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70068,67 +72769,35 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall struct { +type ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall struct { s *Service - artifact string + context string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// QueryArtifactLineageSubgraph: Retrieves lineage of an Artifact represented -// through Artifacts and Executions connected by Event edges and returned as a +// QueryContextLineageSubgraph: Retrieves Artifacts and Executions within the +// specified Context, connected by Event edges and returned as a // LineageSubgraph. // -// - artifact: The resource name of the Artifact whose Lineage needs to be -// retrieved as a LineageSubgraph. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art -// ifacts/{artifact}` The request may error with FAILED_PRECONDITION if the +// - context: The resource name of the Context whose Artifacts and Executions +// should be retrieved as a LineageSubgraph. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}` The request may error with FAILED_PRECONDITION if the // number of Artifacts, the number of Executions, or the number of Events // that would be returned for the Context exceeds 1000. -func (r *ProjectsLocationsMetadataStoresArtifactsService) QueryArtifactLineageSubgraph(artifact string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { - c := &ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.artifact = artifact - return c -} - -// Filter sets the optional parameter "filter": Filter specifying the boolean -// condition for the Artifacts to satisfy in order to be part of the Lineage -// Subgraph. The syntax to define filter query is based on -// https://google.aip.dev/160. The supported set of filters include the -// following: * **Attribute filtering**: For example: `display_name = "test" -// Supported fields include: `name`, `display_name`, `uri`, `state`, -// `schema_title`, `create_time`, and `update_time`. Time fields, such as -// `create_time` and `update_time`, require values specified in RFC-3339 -// format. For example: `create_time = "2020-11-19T11:30:00-04:00" * -// **Metadata field**: To filter on metadata fields use traversal operation as -// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0` -// In case the field name contains special characters (such as colon), one can -// embed it inside double quote. For example: `metadata."field:1".number_value -// = 10.0` Each of the above supported filter types can be combined together -// using logical operators (`AND` & `OR`). Maximum nested expression depth -// allowed is 5. For example: `display_name = "test" AND -// metadata.field1.bool_value = true`. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxHops sets the optional parameter "maxHops": Specifies the size of the -// lineage graph in terms of number of hops from the specified artifact. -// Negative Value: INVALID_ARGUMENT error is returned 0: Only input artifact is -// returned. No value: Transitive closure is performed to return the complete -// graph. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) MaxHops(maxHops int64) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { - c.urlParams_.Set("maxHops", fmt.Sprint(maxHops)) +func (r *ProjectsLocationsMetadataStoresContextsService) QueryContextLineageSubgraph(context string) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { + c := &ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.context = context return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70136,27 +72805,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCal // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -70164,7 +72833,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCal var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+artifact}:queryArtifactLineageSubgraph") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:queryContextLineageSubgraph") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -70172,18 +72841,18 @@ func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCal } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "artifact": c.artifact, + "context": c.context, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.queryArtifactLineageSubgraph" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.queryContextLineageSubgraph" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudAiplatformV1LineageSubgraph.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 *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70215,7 +72884,113 @@ func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCal return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall struct { +type ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall struct { + s *Service + context string + googlecloudaiplatformv1removecontextchildrenrequest *GoogleCloudAiplatformV1RemoveContextChildrenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveContextChildren: Remove a set of children contexts from a parent +// Context. If any of the child Contexts were NOT added to the parent Context, +// they are simply skipped. +// +// - context: The resource name of the parent Context. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) RemoveContextChildren(context string, googlecloudaiplatformv1removecontextchildrenrequest *GoogleCloudAiplatformV1RemoveContextChildrenRequest) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { + c := &ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.context = context + c.googlecloudaiplatformv1removecontextchildrenrequest = googlecloudaiplatformv1removecontextchildrenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1removecontextchildrenrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:removeContextChildren") + 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{ + "context": c.context, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.removeContextChildren" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1RemoveContextChildrenResponse.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 *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RemoveContextChildrenResponse, 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 := &GoogleCloudAiplatformV1RemoveContextChildrenResponse{ + 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 +} + +type ProjectsLocationsMetadataStoresContextsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70234,8 +73009,8 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -70243,27 +73018,27 @@ func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Cancel(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -70281,13 +73056,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.cancel" call. // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70319,7 +73094,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Do(opts . return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall struct { +type ProjectsLocationsMetadataStoresContextsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70333,8 +73108,8 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -70342,27 +73117,27 @@ func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -70380,13 +73155,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.delete" call. // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70418,7 +73193,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Do(opts . return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsOperationsGetCall struct { +type ProjectsLocationsMetadataStoresContextsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70432,8 +73207,8 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -70441,7 +73216,7 @@ func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Get(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70449,27 +73224,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Fields(s ... // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -70490,13 +73265,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.get" call. // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70528,7 +73303,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsOperationsListCall struct { +type ProjectsLocationsMetadataStoresContextsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70541,28 +73316,28 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) List(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) List(name string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -70570,7 +73345,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageToken(p // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70578,27 +73353,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Fields(s .. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -70619,13 +73394,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.list" call. // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70660,7 +73435,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Do(opts ... // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -70678,7 +73453,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Pages(ctx c } } -type ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall struct { +type ProjectsLocationsMetadataStoresContextsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70691,163 +73466,56 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall struct { // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall{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 *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { - 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 -// details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.metadataStores.artifacts.operations.wait" call. -// 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 *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) 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 -} - -type ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall struct { - s *Service - context string - googlecloudaiplatformv1addcontextartifactsandexecutionsrequest *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// `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 *ProjectsLocationsMetadataStoresContextsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c } -// AddContextArtifactsAndExecutions: Adds a set of Artifacts and Executions to -// a Context. If any of the Artifacts or Executions have already been added to -// a Context, they are simply skipped. -// -// - context: The resource name of the Context that the Artifacts and -// Executions belong to. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) AddContextArtifactsAndExecutions(context string, googlecloudaiplatformv1addcontextartifactsandexecutionsrequest *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsRequest) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { - c := &ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.context = context - c.googlecloudaiplatformv1addcontextartifactsandexecutionsrequest = googlecloudaiplatformv1addcontextartifactsandexecutionsrequest +// 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 *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addcontextartifactsandexecutionsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:addContextArtifactsAndExecutions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70855,18 +73523,18 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutions } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "context": c.context, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.addContextArtifactsAndExecutions" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse.ServerRespon -// se.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 *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse, error) { +// *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 *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70885,7 +73553,7 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutions if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -70898,64 +73566,64 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutions return ret, nil } -type ProjectsLocationsMetadataStoresContextsAddContextChildrenCall struct { +type ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall struct { s *Service - context string - googlecloudaiplatformv1addcontextchildrenrequest *GoogleCloudAiplatformV1AddContextChildrenRequest + execution string + googlecloudaiplatformv1addexecutioneventsrequest *GoogleCloudAiplatformV1AddExecutionEventsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// AddContextChildren: Adds a set of Contexts as children to a parent Context. -// If any of the child Contexts have already been added to the parent Context, -// they are simply skipped. If this call would create a cycle or cause any -// Context to have more than 10 parents, the request will fail with an -// INVALID_ARGUMENT error. +// AddExecutionEvents: Adds Events to the specified Execution. An Event +// indicates whether an Artifact was used as an input or output for an +// Execution. If an Event already exists between the Execution and the +// Artifact, the Event is skipped. // -// - context: The resource name of the parent Context. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) AddContextChildren(context string, googlecloudaiplatformv1addcontextchildrenrequest *GoogleCloudAiplatformV1AddContextChildrenRequest) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { - c := &ProjectsLocationsMetadataStoresContextsAddContextChildrenCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.context = context - c.googlecloudaiplatformv1addcontextchildrenrequest = googlecloudaiplatformv1addcontextchildrenrequest +// - execution: The resource name of the Execution that the Events connect +// Artifacts with. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe +// cutions/{execution}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) AddExecutionEvents(execution string, googlecloudaiplatformv1addexecutioneventsrequest *GoogleCloudAiplatformV1AddExecutionEventsRequest) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { + c := &ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.execution = execution + c.googlecloudaiplatformv1addexecutioneventsrequest = googlecloudaiplatformv1addexecutioneventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addcontextchildrenrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addexecutioneventsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:addContextChildren") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+execution}:addExecutionEvents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70963,18 +73631,18 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) doReques } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "context": c.context, + "execution": c.execution, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.addContextChildren" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.addExecutionEvents" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AddContextChildrenResponse.ServerResponse.Header or +// *GoogleCloudAiplatformV1AddExecutionEventsResponse.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 *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddContextChildrenResponse, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddExecutionEventsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70993,7 +73661,7 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1AddContextChildrenResponse{ + ret := &GoogleCloudAiplatformV1AddExecutionEventsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71006,73 +73674,73 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Do(opts return ret, nil } -type ProjectsLocationsMetadataStoresContextsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresExecutionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Context associated with a MetadataStore. +// Create: Creates an Execution associated with a MetadataStore. // -// - parent: The resource name of the MetadataStore where the Context should be -// created. Format: +// - parent: The resource name of the MetadataStore where the Execution should +// be created. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresContextsService) Create(parent string, googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context) *ProjectsLocationsMetadataStoresContextsCreateCall { - c := &ProjectsLocationsMetadataStoresContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsService) Create(parent string, googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution) *ProjectsLocationsMetadataStoresExecutionsCreateCall { + c := &ProjectsLocationsMetadataStoresExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1context = googlecloudaiplatformv1context + c.googlecloudaiplatformv1execution = googlecloudaiplatformv1execution return c } -// ContextId sets the optional parameter "contextId": The {context} portion of -// the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/conte -// xts/{context}`. If not provided, the Context's ID will be a UUID generated -// by the service. Must be 4-128 characters in length. Valid characters are -// `/a-z-/`. Must be unique across all Contexts in the parent MetadataStore. -// (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED -// if the caller can't view the preexisting Context.) -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) ContextId(contextId string) *ProjectsLocationsMetadataStoresContextsCreateCall { - c.urlParams_.Set("contextId", contextId) +// ExecutionId sets the optional parameter "executionId": The {execution} +// portion of the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/execu +// tions/{execution}` If not provided, the Execution's ID will be a UUID +// generated by the service. Must be 4-128 characters in length. Valid +// characters are `/a-z-/`. Must be unique across all Executions in the parent +// MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or +// PERMISSION_DENIED if the caller can't view the preexisting Execution.) +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) ExecutionId(executionId string) *ProjectsLocationsMetadataStoresExecutionsCreateCall { + c.urlParams_.Set("executionId", executionId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsCreateCall { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsCreateCall { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1context) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1execution) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -71085,13 +73753,13 @@ func (c *ProjectsLocationsMetadataStoresContextsCreateCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.create" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Context.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Execution.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 *ProjectsLocationsMetadataStoresContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71110,7 +73778,7 @@ func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Context{ + ret := &GoogleCloudAiplatformV1Execution{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71123,7 +73791,7 @@ func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMetadataStoresContextsDeleteCall struct { +type ProjectsLocationsMetadataStoresExecutionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -71131,56 +73799,49 @@ type ProjectsLocationsMetadataStoresContextsDeleteCall struct { header_ http.Header } -// Delete: Deletes a stored Context. +// Delete: Deletes an Execution. // -// - name: The resource name of the Context to delete. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) Delete(name string) *ProjectsLocationsMetadataStoresContextsDeleteCall { - c := &ProjectsLocationsMetadataStoresContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Execution to delete. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe +// cutions/{execution}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) Delete(name string) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { + c := &ProjectsLocationsMetadataStoresExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Etag sets the optional parameter "etag": The etag of the Context to delete. -// If this is provided, it must match the server's etag. Otherwise, the request -// will fail with a FAILED_PRECONDITION. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresContextsDeleteCall { +// Etag sets the optional parameter "etag": The etag of the Execution to +// delete. If this is provided, it must match the server's etag. Otherwise, the +// request will fail with a FAILED_PRECONDITION. +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { c.urlParams_.Set("etag", etag) return c } -// Force sets the optional parameter "force": The force deletion semantics is -// still undefined. Users should not use this field. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Force(force bool) *ProjectsLocationsMetadataStoresContextsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsDeleteCall { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsDeleteCall { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -71198,13 +73859,13 @@ func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.delete" call. // 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 *ProjectsLocationsMetadataStoresContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71236,7 +73897,7 @@ func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMetadataStoresContextsGetCall struct { +type ProjectsLocationsMetadataStoresExecutionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -71245,13 +73906,13 @@ type ProjectsLocationsMetadataStoresContextsGetCall struct { header_ http.Header } -// Get: Retrieves a specific Context. +// Get: Retrieves a specific Execution. // -// - name: The resource name of the Context to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) Get(name string) *ProjectsLocationsMetadataStoresContextsGetCall { - c := &ProjectsLocationsMetadataStoresContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Execution to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe +// cutions/{execution}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) Get(name string) *ProjectsLocationsMetadataStoresExecutionsGetCall { + c := &ProjectsLocationsMetadataStoresExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -71259,7 +73920,7 @@ func (r *ProjectsLocationsMetadataStoresContextsService) Get(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71267,27 +73928,27 @@ func (c *ProjectsLocationsMetadataStoresContextsGetCall) Fields(s ...googleapi.F // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -71308,13 +73969,13 @@ func (c *ProjectsLocationsMetadataStoresContextsGetCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Context.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Execution.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 *ProjectsLocationsMetadataStoresContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71333,7 +73994,7 @@ func (c *ProjectsLocationsMetadataStoresContextsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Context{ + ret := &GoogleCloudAiplatformV1Execution{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71346,7 +74007,7 @@ func (c *ProjectsLocationsMetadataStoresContextsGetCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsMetadataStoresContextsListCall struct { +type ProjectsLocationsMetadataStoresExecutionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -71355,36 +74016,37 @@ type ProjectsLocationsMetadataStoresContextsListCall struct { header_ http.Header } -// List: Lists Contexts on the MetadataStore. +// List: Lists Executions in the MetadataStore. // -// - parent: The MetadataStore whose Contexts should be listed. Format: +// - parent: The MetadataStore whose Executions should be listed. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresContextsService) List(parent string) *ProjectsLocationsMetadataStoresContextsListCall { - c := &ProjectsLocationsMetadataStoresContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsService) List(parent string) *ProjectsLocationsMetadataStoresExecutionsListCall { + c := &ProjectsLocationsMetadataStoresExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter specifying the boolean -// condition for the Contexts to satisfy in order to be part of the result set. -// The syntax to define filter query is based on https://google.aip.dev/160. -// Following are the supported set of filters: * **Attribute filtering**: For -// example: `display_name = "test". Supported fields include: `name`, -// `display_name`, `schema_title`, `create_time`, and `update_time`. Time -// fields, such as `create_time` and `update_time`, require values specified in -// RFC-3339 format. For example: `create_time = "2020-11-19T11:30:00-04:00". * -// **Metadata field**: To filter on metadata fields use traversal operation as -// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0`. -// In case the field name contains special characters (such as colon), one can -// embed it inside double quote. For example: `metadata."field:1".number_value -// = 10.0` * **Parent Child filtering**: To filter Contexts based on -// parent-child relationship use the HAS operator as follows: ``` -// parent_contexts: "projects//locations//metadataStores//contexts/" -// child_contexts: "projects//locations//metadataStores//contexts/" ``` Each of -// the above supported filters can be combined together using logical operators +// condition for the Executions to satisfy in order to be part of the result +// set. The syntax to define filter query is based on +// https://google.aip.dev/160. Following are the supported set of filters: * +// **Attribute filtering**: For example: `display_name = "test". Supported +// fields include: `name`, `display_name`, `state`, `schema_title`, +// `create_time`, and `update_time`. Time fields, such as `create_time` and +// `update_time`, require values specified in RFC-3339 format. For example: +// `create_time = "2020-11-19T11:30:00-04:00". * **Metadata field**: To filter +// on metadata fields use traversal operation as follows: `metadata..` For +// example: `metadata.field_1.number_value = 10.0` In case the field name +// contains special characters (such as colon), one can embed it inside double +// quote. For example: `metadata."field:1".number_value = 10.0` * **Context +// based filtering**: To filter Executions based on the contexts to which they +// belong use the function operator with the full resource name: +// `in_context()`. For example: +// `in_context("projects//locations//metadataStores//contexts/")` Each of the +// above supported filters can be combined together using logical operators // (`AND` & `OR`). Maximum nested expression depth allowed is 5. For example: // `display_name = "test" AND metadata.field1.bool_value = true`. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("filter", filter) return c } @@ -71395,25 +74057,25 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Filter(filter string) // users append a " desc" suffix; for example: "foo desc, bar". Subfields are // specified with a `.` character, such as foo.bar. see // https://google.aip.dev/132#ordering for more details. -func (c *ProjectsLocationsMetadataStoresContextsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// Contexts to return. The service may return fewer. Must be in range 1-1000, +// Executions to return. The service may return fewer. Must be in range 1-1000, // inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresContextsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListContexts call. Provide this to retrieve -// the subsequent page. When paginating, all other provided parameters must -// match the call that provided the page token. (Otherwise the request will -// fail with INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresContextsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresContextsListCall { +// from a previous MetadataService.ListExecutions call. Provide this to +// retrieve the subsequent page. When paginating, all other provided parameters +// must match the call that provided the page token. (Otherwise the request +// will fail with an INVALID_ARGUMENT error.) +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -71421,7 +74083,7 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) PageToken(pageToken st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71429,27 +74091,27 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -71457,7 +74119,7 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -71470,13 +74132,13 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListContextsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListExecutionsResponse.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 *ProjectsLocationsMetadataStoresContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListContextsResponse, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListExecutionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71495,7 +74157,7 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListContextsResponse{ + ret := &GoogleCloudAiplatformV1ListExecutionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71511,7 +74173,7 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Do(opts ...googleapi.C // 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 *ProjectsLocationsMetadataStoresContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListContextsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListExecutionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -71529,35 +74191,35 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Pages(ctx context.Cont } } -type ProjectsLocationsMetadataStoresContextsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresExecutionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a stored Context. +// Patch: Updates a stored Execution. // -// - name: Immutable. The resource name of the Context. -func (r *ProjectsLocationsMetadataStoresContextsService) Patch(name string, googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context) *ProjectsLocationsMetadataStoresContextsPatchCall { - c := &ProjectsLocationsMetadataStoresContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The resource name of the Execution. +func (r *ProjectsLocationsMetadataStoresExecutionsService) Patch(name string, googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution) *ProjectsLocationsMetadataStoresExecutionsPatchCall { + c := &ProjectsLocationsMetadataStoresExecutionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1context = googlecloudaiplatformv1context + c.googlecloudaiplatformv1execution = googlecloudaiplatformv1execution return c } // AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Context is not found, a new Context is created. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresContextsPatchCall { +// the Execution is not found, a new Execution is created. +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresExecutionsPatchCall { c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // UpdateMask sets the optional parameter "updateMask": A FieldMask indicating // which fields should be updated. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresContextsPatchCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresExecutionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -71565,30 +74227,30 @@ func (c *ProjectsLocationsMetadataStoresContextsPatchCall) UpdateMask(updateMask // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsPatchCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsPatchCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1context) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1execution) if err != nil { return nil, err } @@ -71607,116 +74269,13 @@ func (c *ProjectsLocationsMetadataStoresContextsPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Context.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 *ProjectsLocationsMetadataStoresContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, 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 := &GoogleCloudAiplatformV1Context{ - 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 -} - -type ProjectsLocationsMetadataStoresContextsPurgeCall struct { - s *Service - parent string - googlecloudaiplatformv1purgecontextsrequest *GoogleCloudAiplatformV1PurgeContextsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Purge: Purges Contexts. -// -// - parent: The metadata store to purge Contexts from. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresContextsService) Purge(parent string, googlecloudaiplatformv1purgecontextsrequest *GoogleCloudAiplatformV1PurgeContextsRequest) *ProjectsLocationsMetadataStoresContextsPurgeCall { - c := &ProjectsLocationsMetadataStoresContextsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1purgecontextsrequest = googlecloudaiplatformv1purgecontextsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsPurgeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsPurgeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgecontextsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts:purge") - 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.metadataStores.contexts.purge" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.patch" call. // 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 +// *GoogleCloudAiplatformV1Execution.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 *ProjectsLocationsMetadataStoresContextsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71735,7 +74294,7 @@ func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Execution{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71748,90 +74307,78 @@ func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall struct { - s *Service - context string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// QueryContextLineageSubgraph: Retrieves Artifacts and Executions within the -// specified Context, connected by Event edges and returned as a -// LineageSubgraph. +type ProjectsLocationsMetadataStoresExecutionsPurgeCall struct { + s *Service + parent string + googlecloudaiplatformv1purgeexecutionsrequest *GoogleCloudAiplatformV1PurgeExecutionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Purges Executions. // -// - context: The resource name of the Context whose Artifacts and Executions -// should be retrieved as a LineageSubgraph. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}` The request may error with FAILED_PRECONDITION if the -// number of Artifacts, the number of Executions, or the number of Events -// that would be returned for the Context exceeds 1000. -func (r *ProjectsLocationsMetadataStoresContextsService) QueryContextLineageSubgraph(context string) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { - c := &ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.context = context +// - parent: The metadata store to purge Executions from. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) Purge(parent string, googlecloudaiplatformv1purgeexecutionsrequest *GoogleCloudAiplatformV1PurgeExecutionsRequest) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { + c := &ProjectsLocationsMetadataStoresExecutionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1purgeexecutionsrequest = googlecloudaiplatformv1purgeexecutionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgeexecutionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:queryContextLineageSubgraph") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "context": c.context, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.queryContextLineageSubgraph" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1LineageSubgraph.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71850,7 +74397,7 @@ func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1LineageSubgraph{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71863,81 +74410,88 @@ func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) return ret, nil } -type ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall struct { - s *Service - context string - googlecloudaiplatformv1removecontextchildrenrequest *GoogleCloudAiplatformV1RemoveContextChildrenRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall struct { + s *Service + execution string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RemoveContextChildren: Remove a set of children contexts from a parent -// Context. If any of the child Contexts were NOT added to the parent Context, -// they are simply skipped. +// QueryExecutionInputsAndOutputs: Obtains the set of input and output +// Artifacts for this Execution, in the form of LineageSubgraph that also +// contains the Execution and connecting Events. // -// - context: The resource name of the parent Context. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) RemoveContextChildren(context string, googlecloudaiplatformv1removecontextchildrenrequest *GoogleCloudAiplatformV1RemoveContextChildrenRequest) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { - c := &ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.context = context - c.googlecloudaiplatformv1removecontextchildrenrequest = googlecloudaiplatformv1removecontextchildrenrequest +// - execution: The resource name of the Execution whose input and output +// Artifacts should be retrieved as a LineageSubgraph. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe +// cutions/{execution}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) QueryExecutionInputsAndOutputs(execution string) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { + c := &ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.execution = execution return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1removecontextchildrenrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+context}:removeContextChildren") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+execution}:queryExecutionInputsAndOutputs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "context": c.context, + "execution": c.execution, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.removeContextChildren" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.queryExecutionInputsAndOutputs" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RemoveContextChildrenResponse.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 +// *GoogleCloudAiplatformV1LineageSubgraph.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 *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RemoveContextChildrenResponse, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71956,7 +74510,7 @@ func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1RemoveContextChildrenResponse{ + ret := &GoogleCloudAiplatformV1LineageSubgraph{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71969,7 +74523,7 @@ func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Do(op return ret, nil } -type ProjectsLocationsMetadataStoresContextsOperationsCancelCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -71988,8 +74542,8 @@ type ProjectsLocationsMetadataStoresContextsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -71997,27 +74551,27 @@ func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Cancel(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -72035,13 +74589,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.cancel" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72073,7 +74627,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Do(opts .. return ret, nil } -type ProjectsLocationsMetadataStoresContextsOperationsDeleteCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72087,8 +74641,8 @@ type ProjectsLocationsMetadataStoresContextsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -72096,27 +74650,27 @@ func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Delete(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -72134,13 +74688,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.delete" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72172,7 +74726,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Do(opts .. return ret, nil } -type ProjectsLocationsMetadataStoresContextsOperationsGetCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72186,8 +74740,8 @@ type ProjectsLocationsMetadataStoresContextsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -72195,7 +74749,7 @@ func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Get(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72203,27 +74757,27 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Fields(s ...g // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -72244,13 +74798,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.get" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72282,7 +74836,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Do(opts ...go return ret, nil } -type ProjectsLocationsMetadataStoresContextsOperationsListCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72295,28 +74849,28 @@ type ProjectsLocationsMetadataStoresContextsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) List(name string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) List(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -72324,7 +74878,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageToken(pa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72332,27 +74886,27 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Fields(s ... // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -72373,13 +74927,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.list" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72414,7 +74968,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Do(opts ...g // 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 *ProjectsLocationsMetadataStoresContextsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -72432,7 +74986,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Pages(ctx co } } -type ProjectsLocationsMetadataStoresContextsOperationsWaitCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72451,8 +75005,8 @@ type ProjectsLocationsMetadataStoresContextsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -72461,7 +75015,7 @@ func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Wait(name str // 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 *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -72469,27 +75023,27 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Timeout(time // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -72507,13 +75061,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.wait" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.wait" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72545,306 +75099,92 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Do(opts ...g return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall struct { - s *Service - execution string - googlecloudaiplatformv1addexecutioneventsrequest *GoogleCloudAiplatformV1AddExecutionEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddExecutionEvents: Adds Events to the specified Execution. An Event -// indicates whether an Artifact was used as an input or output for an -// Execution. If an Event already exists between the Execution and the -// Artifact, the Event is skipped. -// -// - execution: The resource name of the Execution that the Events connect -// Artifacts with. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe -// cutions/{execution}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) AddExecutionEvents(execution string, googlecloudaiplatformv1addexecutioneventsrequest *GoogleCloudAiplatformV1AddExecutionEventsRequest) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { - c := &ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.execution = execution - c.googlecloudaiplatformv1addexecutioneventsrequest = googlecloudaiplatformv1addexecutioneventsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addexecutioneventsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+execution}:addExecutionEvents") - 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{ - "execution": c.execution, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.metadataStores.executions.addExecutionEvents" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AddExecutionEventsResponse.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 *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddExecutionEventsResponse, 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 := &GoogleCloudAiplatformV1AddExecutionEventsResponse{ - 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 -} - -type ProjectsLocationsMetadataStoresExecutionsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresMetadataSchemasCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1metadataschema *GoogleCloudAiplatformV1MetadataSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Execution associated with a MetadataStore. +// Create: Creates a MetadataSchema. // -// - parent: The resource name of the MetadataStore where the Execution should -// be created. Format: +// - parent: The resource name of the MetadataStore where the MetadataSchema +// should be created. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Create(parent string, googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution) *ProjectsLocationsMetadataStoresExecutionsCreateCall { - c := &ProjectsLocationsMetadataStoresExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Create(parent string, googlecloudaiplatformv1metadataschema *GoogleCloudAiplatformV1MetadataSchema) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { + c := &ProjectsLocationsMetadataStoresMetadataSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1execution = googlecloudaiplatformv1execution + c.googlecloudaiplatformv1metadataschema = googlecloudaiplatformv1metadataschema return c } -// ExecutionId sets the optional parameter "executionId": The {execution} -// portion of the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/execu -// tions/{execution}` If not provided, the Execution's ID will be a UUID -// generated by the service. Must be 4-128 characters in length. Valid -// characters are `/a-z-/`. Must be unique across all Executions in the parent -// MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or -// PERMISSION_DENIED if the caller can't view the preexisting Execution.) -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) ExecutionId(executionId string) *ProjectsLocationsMetadataStoresExecutionsCreateCall { - c.urlParams_.Set("executionId", executionId) +// MetadataSchemaId sets the optional parameter "metadataSchemaId": The +// {metadata_schema} portion of the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metad +// ataSchemas/{metadataschema}` If not provided, the MetadataStore's ID will be +// a UUID generated by the service. Must be 4-128 characters in length. Valid +// characters are `/a-z-/`. Must be unique across all MetadataSchemas in the +// parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or +// PERMISSION_DENIED if the caller can't view the preexisting MetadataSchema.) +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) MetadataSchemaId(metadataSchemaId string) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { + c.urlParams_.Set("metadataSchemaId", metadataSchemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsCreateCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsCreateCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1execution) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions") - 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.metadataStores.executions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Execution.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 *ProjectsLocationsMetadataStoresExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, 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 := &GoogleCloudAiplatformV1Execution{ - 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 -} - -type ProjectsLocationsMetadataStoresExecutionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an Execution. -// -// - name: The resource name of the Execution to delete. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe -// cutions/{execution}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Delete(name string) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { - c := &ProjectsLocationsMetadataStoresExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Etag sets the optional parameter "etag": The etag of the Execution to -// delete. If this is provided, it must match the server's etag. Otherwise, the -// request will fail with a FAILED_PRECONDITION. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { - c.urlParams_.Set("etag", etag) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1metadataschema) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataSchemas") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.create" call. // 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 +// *GoogleCloudAiplatformV1MetadataSchema.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 *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72863,7 +75203,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1MetadataSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72876,7 +75216,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsGetCall struct { +type ProjectsLocationsMetadataStoresMetadataSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72885,13 +75225,13 @@ type ProjectsLocationsMetadataStoresExecutionsGetCall struct { header_ http.Header } -// Get: Retrieves a specific Execution. +// Get: Retrieves a specific MetadataSchema. // -// - name: The resource name of the Execution to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe -// cutions/{execution}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Get(name string) *ProjectsLocationsMetadataStoresExecutionsGetCall { - c := &ProjectsLocationsMetadataStoresExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the MetadataSchema to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/met +// adataSchemas/{metadataschema}`. +func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Get(name string) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { + c := &ProjectsLocationsMetadataStoresMetadataSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -72899,7 +75239,7 @@ func (r *ProjectsLocationsMetadataStoresExecutionsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsGetCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72907,27 +75247,27 @@ func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsGetCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsGetCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -72948,13 +75288,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Execution.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1MetadataSchema.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 *ProjectsLocationsMetadataStoresExecutionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72973,7 +75313,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Execution{ + ret := &GoogleCloudAiplatformV1MetadataSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72986,7 +75326,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsListCall struct { +type ProjectsLocationsMetadataStoresMetadataSchemasListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -72995,66 +75335,37 @@ type ProjectsLocationsMetadataStoresExecutionsListCall struct { header_ http.Header } -// List: Lists Executions in the MetadataStore. +// List: Lists MetadataSchemas. // -// - parent: The MetadataStore whose Executions should be listed. Format: +// - parent: The MetadataStore whose MetadataSchemas should be listed. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) List(parent string) *ProjectsLocationsMetadataStoresExecutionsListCall { - c := &ProjectsLocationsMetadataStoresExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) List(parent string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { + c := &ProjectsLocationsMetadataStoresMetadataSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter specifying the boolean -// condition for the Executions to satisfy in order to be part of the result -// set. The syntax to define filter query is based on -// https://google.aip.dev/160. Following are the supported set of filters: * -// **Attribute filtering**: For example: `display_name = "test". Supported -// fields include: `name`, `display_name`, `state`, `schema_title`, -// `create_time`, and `update_time`. Time fields, such as `create_time` and -// `update_time`, require values specified in RFC-3339 format. For example: -// `create_time = "2020-11-19T11:30:00-04:00". * **Metadata field**: To filter -// on metadata fields use traversal operation as follows: `metadata..` For -// example: `metadata.field_1.number_value = 10.0` In case the field name -// contains special characters (such as colon), one can embed it inside double -// quote. For example: `metadata."field:1".number_value = 10.0` * **Context -// based filtering**: To filter Executions based on the contexts to which they -// belong use the function operator with the full resource name: -// `in_context()`. For example: -// `in_context("projects//locations//metadataStores//contexts/")` Each of the -// above supported filters can be combined together using logical operators -// (`AND` & `OR`). Maximum nested expression depth allowed is 5. For example: -// `display_name = "test" AND metadata.field1.bool_value = true`. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresExecutionsListCall { +// Filter sets the optional parameter "filter": A query to filter available +// MetadataSchemas for matching results. +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Filter(filter string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": How the list of messages is -// ordered. Specify the values to order by and an ordering operation. The -// default sorting order is ascending. To specify descending order for a field, -// users append a " desc" suffix; for example: "foo desc, bar". Subfields are -// specified with a `.` character, such as foo.bar. see -// https://google.aip.dev/132#ordering for more details. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresExecutionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number of -// Executions to return. The service may return fewer. Must be in range 1-1000, -// inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresExecutionsListCall { +// MetadataSchemas to return. The service may return fewer. Must be in range +// 1-1000, inclusive. Defaults to 100. +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListExecutions call. Provide this to -// retrieve the subsequent page. When paginating, all other provided parameters -// must match the call that provided the page token. (Otherwise the request -// will fail with an INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresExecutionsListCall { +// from a previous MetadataService.ListMetadataSchemas call. Provide this to +// retrieve the next page. When paginating, all other provided parameters must +// match the call that provided the page token. (Otherwise the request will +// fail with INVALID_ARGUMENT error.) +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -73062,7 +75373,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsListCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73070,27 +75381,27 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Fields(s ...googleap // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsListCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsListCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -73098,7 +75409,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataSchemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -73111,13 +75422,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListExecutionsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListMetadataSchemasResponse.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 *ProjectsLocationsMetadataStoresExecutionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListExecutionsResponse, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListMetadataSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73136,7 +75447,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListExecutionsResponse{ + ret := &GoogleCloudAiplatformV1ListMetadataSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73152,7 +75463,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Do(opts ...googleapi // 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 *ProjectsLocationsMetadataStoresExecutionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListExecutionsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListMetadataSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -73170,74 +75481,62 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Pages(ctx context.Co } } -type ProjectsLocationsMetadataStoresExecutionsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a stored Execution. +// 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`. // -// - name: Output only. The resource name of the Execution. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Patch(name string, googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution) *ProjectsLocationsMetadataStoresExecutionsPatchCall { - c := &ProjectsLocationsMetadataStoresExecutionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsMetadataStoresOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresOperationsCancelCall { + c := &ProjectsLocationsMetadataStoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1execution = googlecloudaiplatformv1execution - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Execution is not found, a new Execution is created. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresExecutionsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": A FieldMask indicating -// which fields should be updated. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresExecutionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsPatchCall { +func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsPatchCall { +func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1execution) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -73248,13 +75547,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.patch" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Execution.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 *ProjectsLocationsMetadataStoresExecutionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { +// *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 *ProjectsLocationsMetadataStoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73273,7 +75572,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Execution{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73286,78 +75585,74 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsPurgeCall struct { - s *Service - parent string - googlecloudaiplatformv1purgeexecutionsrequest *GoogleCloudAiplatformV1PurgeExecutionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Purges Executions. +// 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`. // -// - parent: The metadata store to purge Executions from. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Purge(parent string, googlecloudaiplatformv1purgeexecutionsrequest *GoogleCloudAiplatformV1PurgeExecutionsRequest) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { - c := &ProjectsLocationsMetadataStoresExecutionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1purgeexecutionsrequest = googlecloudaiplatformv1purgeexecutionsrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsMetadataStoresOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresOperationsDeleteCall { + c := &ProjectsLocationsMetadataStoresOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { +func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { +func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgeexecutionsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } 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.metadataStores.executions.purge" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.delete" call. // 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 *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsMetadataStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73376,7 +75671,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Do(opts ...googleap 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, @@ -73389,33 +75684,30 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall struct { +type ProjectsLocationsMetadataStoresOperationsGetCall struct { s *Service - execution string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// QueryExecutionInputsAndOutputs: Obtains the set of input and output -// Artifacts for this Execution, in the form of LineageSubgraph that also -// contains the Execution and connecting Events. +// 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. // -// - execution: The resource name of the Execution whose input and output -// Artifacts should be retrieved as a LineageSubgraph. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe -// cutions/{execution}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) QueryExecutionInputsAndOutputs(execution string) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { - c := &ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.execution = execution +// - name: The name of the operation resource. +func (r *ProjectsLocationsMetadataStoresOperationsService) Get(name string) *ProjectsLocationsMetadataStoresOperationsGetCall { + c := &ProjectsLocationsMetadataStoresOperationsGetCall{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 // details. -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73423,27 +75715,27 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -73451,7 +75743,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+execution}:queryExecutionInputsAndOutputs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -73459,18 +75751,18 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "execution": c.execution, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.queryExecutionInputsAndOutputs" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1LineageSubgraph.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73489,7 +75781,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1LineageSubgraph{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73502,62 +75794,87 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + 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`. +// 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 resource to be cancelled. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsMetadataStoresOperationsService) List(name string) *ProjectsLocationsMetadataStoresOperationsListCall { + c := &ProjectsLocationsMetadataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsMetadataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsMetadataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsMetadataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresOperationsListCall { + 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 // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMetadataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -73568,13 +75885,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.list" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsMetadataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73593,7 +75910,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73606,7 +75923,28 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Do(opts return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall struct { +// 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 *ProjectsLocationsMetadataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsMetadataStoresOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -73614,49 +75952,63 @@ type ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall struct { 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`. +// 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 deleted. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsMetadataStoresOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresOperationsWaitCall { + c := &ProjectsLocationsMetadataStoresOperationsWaitCall{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 *ProjectsLocationsMetadataStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -73667,13 +76019,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.wait" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsMetadataStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73692,7 +76044,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Do(opts 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, @@ -73705,85 +76057,79 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Do(opts return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigratableResourcesBatchMigrateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchmigrateresourcesrequest *GoogleCloudAiplatformV1BatchMigrateResourcesRequest + urlParams_ gensupport.URLParams + 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. +// BatchMigrate: Batch migrates resources from ml.googleapis.com, +// automl.googleapis.com, and datalabeling.googleapis.com to Vertex AI. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The location of the migrated resource will live in. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsMigratableResourcesService) BatchMigrate(parent string, googlecloudaiplatformv1batchmigrateresourcesrequest *GoogleCloudAiplatformV1BatchMigrateResourcesRequest) *ProjectsLocationsMigratableResourcesBatchMigrateCall { + c := &ProjectsLocationsMigratableResourcesBatchMigrateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchmigrateresourcesrequest = googlecloudaiplatformv1batchmigrateresourcesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesBatchMigrateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesBatchMigrateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchmigrateresourcesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratableResources:batchMigrate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.get" call. +// Do executes the "aiplatform.projects.locations.migratableResources.batchMigrate" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73815,104 +76161,82 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigratableResourcesSearchCall struct { + s *Service + parent string + googlecloudaiplatformv1searchmigratableresourcesrequest *GoogleCloudAiplatformV1SearchMigratableResourcesRequest + urlParams_ gensupport.URLParams + 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`. +// Search: Searches all of the resources in automl.googleapis.com, +// datalabeling.googleapis.com and ml.googleapis.com that can be migrated to +// Vertex AI's given location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) List(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: The location that the migratable resources should be searched +// from. It's the Vertex AI location that the resources can be migrated to, +// not the resources' original location. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsMigratableResourcesService) Search(parent string, googlecloudaiplatformv1searchmigratableresourcesrequest *GoogleCloudAiplatformV1SearchMigratableResourcesRequest) *ProjectsLocationsMigratableResourcesSearchCall { + c := &ProjectsLocationsMigratableResourcesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1searchmigratableresourcesrequest = googlecloudaiplatformv1searchmigratableresourcesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { +func (c *ProjectsLocationsMigratableResourcesSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { +func (c *ProjectsLocationsMigratableResourcesSearchCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMigratableResourcesSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchmigratableresourcesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratableResources:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.list" call. +// Do executes the "aiplatform.projects.locations.migratableResources.search" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudAiplatformV1SearchMigratableResourcesResponse.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 *ProjectsLocationsMigratableResourcesSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchMigratableResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73931,7 +76255,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1SearchMigratableResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73947,9 +76271,9 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Do(opts .. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsMigratableResourcesSearchCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchMigratableResourcesResponse) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) + defer func(pt string) { c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken = pt }(c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken) for { x, err := c.Do() if err != nil { @@ -73961,11 +76285,11 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Pages(ctx if x.NextPageToken == "" { return nil } - c.PageToken(x.NextPageToken) + c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken = x.NextPageToken } } -type ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall struct { +type ProjectsLocationsMigratableResourcesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -73973,61 +76297,52 @@ type ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall struct { 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. +// 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`. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsMigratableResourcesOperationsService) Cancel(name string) *ProjectsLocationsMigratableResourcesOperationsCancelCall { + c := &ProjectsLocationsMigratableResourcesOperationsCancelCall{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 *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { - 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 // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { +func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { +func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -74040,13 +76355,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.wait" call. +// Do executes the "aiplatform.projects.locations.migratableResources.operations.cancel" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsMigratableResourcesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74065,7 +76380,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Do(opts .. 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, @@ -74078,92 +76393,74 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Do(opts .. return ret, nil } -type ProjectsLocationsMetadataStoresMetadataSchemasCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1metadataschema *GoogleCloudAiplatformV1MetadataSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigratableResourcesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a MetadataSchema. +// 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`. // -// - parent: The resource name of the MetadataStore where the MetadataSchema -// should be created. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Create(parent string, googlecloudaiplatformv1metadataschema *GoogleCloudAiplatformV1MetadataSchema) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { - c := &ProjectsLocationsMetadataStoresMetadataSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1metadataschema = googlecloudaiplatformv1metadataschema - return c -} - -// MetadataSchemaId sets the optional parameter "metadataSchemaId": The -// {metadata_schema} portion of the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metad -// ataSchemas/{metadataschema}` If not provided, the MetadataStore's ID will be -// a UUID generated by the service. Must be 4-128 characters in length. Valid -// characters are `/a-z-/`. Must be unique across all MetadataSchemas in the -// parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or -// PERMISSION_DENIED if the caller can't view the preexisting MetadataSchema.) -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) MetadataSchemaId(metadataSchemaId string) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { - c.urlParams_.Set("metadataSchemaId", metadataSchemaId) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsMigratableResourcesOperationsService) Delete(name string) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { + c := &ProjectsLocationsMigratableResourcesOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { +func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { +func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1metadataschema) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataSchemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } 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.metadataStores.metadataSchemas.create" call. +// Do executes the "aiplatform.projects.locations.migratableResources.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1MetadataSchema.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 *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataSchema, error) { +// *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 *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74182,7 +76479,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1MetadataSchema{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74195,7 +76492,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsMetadataStoresMetadataSchemasGetCall struct { +type ProjectsLocationsMigratableResourcesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -74204,13 +76501,13 @@ type ProjectsLocationsMetadataStoresMetadataSchemasGetCall struct { header_ http.Header } -// Get: Retrieves a specific MetadataSchema. +// 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 resource name of the MetadataSchema to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/met -// adataSchemas/{metadataschema}`. -func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Get(name string) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { - c := &ProjectsLocationsMetadataStoresMetadataSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsMigratableResourcesOperationsService) Get(name string) *ProjectsLocationsMigratableResourcesOperationsGetCall { + c := &ProjectsLocationsMigratableResourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -74218,7 +76515,7 @@ func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74226,27 +76523,27 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Fields(s ...goog // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigratableResourcesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -74267,13 +76564,13 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.get" call. +// Do executes the "aiplatform.projects.locations.migratableResources.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1MetadataSchema.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataSchema, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74292,7 +76589,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1MetadataSchema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74305,46 +76602,41 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsMetadataStoresMetadataSchemasListCall struct { +type ProjectsLocationsMigratableResourcesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists MetadataSchemas. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The MetadataStore whose MetadataSchemas should be listed. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) List(parent string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { - c := &ProjectsLocationsMetadataStoresMetadataSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsMigratableResourcesOperationsService) List(name string) *ProjectsLocationsMigratableResourcesOperationsListCall { + c := &ProjectsLocationsMigratableResourcesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": A query to filter available -// MetadataSchemas for matching results. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Filter(filter string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Filter(filter string) *ProjectsLocationsMigratableResourcesOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// MetadataSchemas to return. The service may return fewer. Must be in range -// 1-1000, inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMigratableResourcesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListMetadataSchemas call. Provide this to -// retrieve the next page. When paginating, all other provided parameters must -// match the call that provided the page token. (Otherwise the request will -// fail with INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMigratableResourcesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -74352,7 +76644,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74360,27 +76652,27 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Fields(s ...goo // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigratableResourcesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -74388,7 +76680,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataSchemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -74396,18 +76688,18 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) doRequest(alt s } 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.metadataStores.metadataSchemas.list" call. +// Do executes the "aiplatform.projects.locations.migratableResources.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListMetadataSchemasResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListMetadataSchemasResponse, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74426,7 +76718,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListMetadataSchemasResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74442,7 +76734,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Do(opts ...goog // 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 *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListMetadataSchemasResponse) error) error { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -74460,7 +76752,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Pages(ctx conte } } -type ProjectsLocationsMetadataStoresOperationsCancelCall struct { +type ProjectsLocationsMigratableResourcesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -74468,52 +76760,165 @@ type ProjectsLocationsMetadataStoresOperationsCancelCall 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 *ProjectsLocationsMetadataStoresOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresOperationsCancelCall { - c := &ProjectsLocationsMetadataStoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsMigratableResourcesOperationsService) Wait(name string) *ProjectsLocationsMigratableResourcesOperationsWaitCall { + c := &ProjectsLocationsMigratableResourcesOperationsWaitCall{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 *ProjectsLocationsMigratableResourcesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMigratableResourcesOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsCancelCall { +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsCancelCall { +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.migratableResources.operations.wait" call. +// 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 *ProjectsLocationsMigratableResourcesOperationsWaitCall) 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 +} + +type ProjectsLocationsModelDeploymentMonitoringJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a ModelDeploymentMonitoringJob. It will run periodically on +// a configured interval. +// +// - parent: The parent of the ModelDeploymentMonitoringJob. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Create(parent string, googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1modeldeploymentmonitoringjob = googlecloudaiplatformv1modeldeploymentmonitoringjob + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1modeldeploymentmonitoringjob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/modelDeploymentMonitoringJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -74521,18 +76926,18 @@ func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.create" call. // 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 *ProjectsLocationsMetadataStoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob.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 *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelDeploymentMonitoringJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74551,7 +76956,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ModelDeploymentMonitoringJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74564,7 +76969,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsMetadataStoresOperationsDeleteCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -74572,14 +76977,13 @@ type ProjectsLocationsMetadataStoresOperationsDeleteCall struct { 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`. +// Delete: Deletes a ModelDeploymentMonitoringJob. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMetadataStoresOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresOperationsDeleteCall { - c := &ProjectsLocationsMetadataStoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the model monitoring job to delete. Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Delete(name string) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -74587,27 +76991,27 @@ func (r *ProjectsLocationsMetadataStoresOperationsService) Delete(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsDeleteCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsDeleteCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -74625,13 +77029,13 @@ func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.operations.delete" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.delete" call. // 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 *ProjectsLocationsMetadataStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74650,7 +77054,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Do(opts ...googlea 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, @@ -74663,7 +77067,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsMetadataStoresOperationsGetCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -74672,13 +77076,13 @@ type ProjectsLocationsMetadataStoresOperationsGetCall struct { 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. +// Get: Gets a ModelDeploymentMonitoringJob. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsMetadataStoresOperationsService) Get(name string) *ProjectsLocationsMetadataStoresOperationsGetCall { - c := &ProjectsLocationsMetadataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ModelDeploymentMonitoringJob. Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Get(name string) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -74686,7 +77090,7 @@ func (r *ProjectsLocationsMetadataStoresOperationsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74694,27 +77098,27 @@ func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -74735,13 +77139,13 @@ func (c *ProjectsLocationsMetadataStoresOperationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.operations.get" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.get" call. // 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 +// *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob.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 *ProjectsLocationsMetadataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelDeploymentMonitoringJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74760,7 +77164,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ModelDeploymentMonitoringJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74773,49 +77177,66 @@ func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsMetadataStoresOperationsListCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsListCall struct { s *Service - name string + parent 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`. +// List: Lists ModelDeploymentMonitoringJobs in a Location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMetadataStoresOperationsService) List(name string) *ProjectsLocationsMetadataStoresOperationsListCall { - c := &ProjectsLocationsMetadataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent of the ModelDeploymentMonitoringJob. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) List(parent string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresOperationsListCall { +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Filter(filter string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) PageSize(pageSize int64) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) PageToken(pageToken string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) ReadMask(readMask string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74823,27 +77244,27 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) Fields(s ...googleap // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -74851,7 +77272,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/modelDeploymentMonitoringJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -74859,18 +77280,18 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.operations.list" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.list" call. // 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 *ProjectsLocationsMetadataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse.ServerRespo +// nse.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 *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74889,7 +77310,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74905,7 +77326,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) Do(opts ...googleapi // 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 *ProjectsLocationsMetadataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -74923,71 +77344,87 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) Pages(ctx context.Co } } -type ProjectsLocationsMetadataStoresOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelDeploymentMonitoringJobsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob + 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. +// Patch: Updates a ModelDeploymentMonitoringJob. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMetadataStoresOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresOperationsWaitCall { - c := &ProjectsLocationsMetadataStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of a ModelDeploymentMonitoringJob. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Patch(name string, googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1modeldeploymentmonitoringjob = googlecloudaiplatformv1modeldeploymentmonitoringjob 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 *ProjectsLocationsMetadataStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask is used to specify the fields to be overwritten in the +// ModelDeploymentMonitoringJob resource by the update. The fields specified in +// the update_mask are relative to the resource, not the full request. A field +// will be overwritten if it is in the mask. If the user does not provide a +// mask then only the non-empty fields present in the request will be +// overwritten. Set the update_mask to `*` to override all fields. For the +// objective config, the user can either provide the update mask for +// model_deployment_monitoring_objective_configs or any combination of its +// nested fields, such as: +// model_deployment_monitoring_objective_configs.objective_config.training_datas +// et. Updatable fields: * `display_name` * +// `model_deployment_monitoring_schedule_config` * +// `model_monitoring_alert_config` * `logging_sampling_strategy` * `labels` * +// `log_ttl` * `enable_monitoring_pipeline_logs` . and * +// `model_deployment_monitoring_objective_configs` . or * +// `model_deployment_monitoring_objective_configs.objective_config.training_data +// set` * +// `model_deployment_monitoring_objective_configs.objective_config.training_pred +// iction_skew_detection_config` * +// `model_deployment_monitoring_objective_configs.objective_config.prediction_dr +// ift_detection_config` +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1modeldeploymentmonitoringjob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -74998,13 +77435,13 @@ func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.operations.wait" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.patch" call. // 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 *ProjectsLocationsMetadataStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75036,60 +77473,63 @@ func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMigratableResourcesBatchMigrateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchmigrateresourcesrequest *GoogleCloudAiplatformV1BatchMigrateResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelDeploymentMonitoringJobsPauseCall struct { + s *Service + name string + googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchMigrate: Batch migrates resources from ml.googleapis.com, -// automl.googleapis.com, and datalabeling.googleapis.com to Vertex AI. +// Pause: Pauses a ModelDeploymentMonitoringJob. If the job is running, the +// server makes a best effort to cancel the job. Will mark +// ModelDeploymentMonitoringJob.state to 'PAUSED'. // -// - parent: The location of the migrated resource will live in. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsMigratableResourcesService) BatchMigrate(parent string, googlecloudaiplatformv1batchmigrateresourcesrequest *GoogleCloudAiplatformV1BatchMigrateResourcesRequest) *ProjectsLocationsMigratableResourcesBatchMigrateCall { - c := &ProjectsLocationsMigratableResourcesBatchMigrateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchmigrateresourcesrequest = googlecloudaiplatformv1batchmigrateresourcesrequest +// - name: The resource name of the ModelDeploymentMonitoringJob to pause. +// Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Pause(name string, googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest = googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesBatchMigrateCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesBatchMigrateCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchmigrateresourcesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratableResources:batchMigrate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:pause") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -75097,18 +77537,18 @@ func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) doRequest(alt str } 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.migratableResources.batchMigrate" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.pause" call. // 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 *ProjectsLocationsMigratableResourcesBatchMigrateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75127,7 +77567,7 @@ func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Do(opts ...google 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, @@ -75140,63 +77580,63 @@ func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Do(opts ...google return ret, nil } -type ProjectsLocationsMigratableResourcesSearchCall struct { - s *Service - parent string - googlecloudaiplatformv1searchmigratableresourcesrequest *GoogleCloudAiplatformV1SearchMigratableResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelDeploymentMonitoringJobsResumeCall struct { + s *Service + name string + googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Search: Searches all of the resources in automl.googleapis.com, -// datalabeling.googleapis.com and ml.googleapis.com that can be migrated to -// Vertex AI's given location. +// Resume: Resumes a paused ModelDeploymentMonitoringJob. It will start to run +// from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be +// resumed. // -// - parent: The location that the migratable resources should be searched -// from. It's the Vertex AI location that the resources can be migrated to, -// not the resources' original location. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsMigratableResourcesService) Search(parent string, googlecloudaiplatformv1searchmigratableresourcesrequest *GoogleCloudAiplatformV1SearchMigratableResourcesRequest) *ProjectsLocationsMigratableResourcesSearchCall { - c := &ProjectsLocationsMigratableResourcesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1searchmigratableresourcesrequest = googlecloudaiplatformv1searchmigratableresourcesrequest +// - name: The resource name of the ModelDeploymentMonitoringJob to resume. +// Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Resume(name string, googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest = googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesSearchCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesSearchCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesSearchCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesSearchCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchmigratableresourcesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratableResources:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -75204,18 +77644,124 @@ func (c *ProjectsLocationsMigratableResourcesSearchCall) doRequest(alt string) ( } 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.migratableResources.search" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.resume" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchMigratableResourcesResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *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 *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) 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 +} + +type ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall struct { + s *Service + modelDeploymentMonitoringJob string + googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchModelDeploymentMonitoringStatsAnomalies: Searches Model Monitoring +// Statistics generated within a given time window. +// +// - modelDeploymentMonitoringJob: ModelDeploymentMonitoring Job resource name. +// Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) SearchModelDeploymentMonitoringStatsAnomalies(modelDeploymentMonitoringJob string, googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.modelDeploymentMonitoringJob = modelDeploymentMonitoringJob + c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest = googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+modelDeploymentMonitoringJob}:searchModelDeploymentMonitoringStatsAnomalies") + 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{ + "modelDeploymentMonitoringJob": c.modelDeploymentMonitoringJob, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.searchModelDeploymentMonitoringStatsAnomalies" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse +// .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 *ProjectsLocationsMigratableResourcesSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchMigratableResourcesResponse, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75234,7 +77780,7 @@ func (c *ProjectsLocationsMigratableResourcesSearchCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchMigratableResourcesResponse{ + ret := &GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75250,9 +77796,11 @@ func (c *ProjectsLocationsMigratableResourcesSearchCall) Do(opts ...googleapi.Ca // 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 *ProjectsLocationsMigratableResourcesSearchCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchMigratableResourcesResponse) error) error { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken = pt }(c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken) + defer func(pt string) { + c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken = pt + }(c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken) for { x, err := c.Do() if err != nil { @@ -75264,11 +77812,11 @@ func (c *ProjectsLocationsMigratableResourcesSearchCall) Pages(ctx context.Conte if x.NextPageToken == "" { return nil } - c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken = x.NextPageToken + c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken = x.NextPageToken } } -type ProjectsLocationsMigratableResourcesOperationsCancelCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75287,8 +77835,8 @@ type ProjectsLocationsMigratableResourcesOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsMigratableResourcesOperationsService) Cancel(name string) *ProjectsLocationsMigratableResourcesOperationsCancelCall { - c := &ProjectsLocationsMigratableResourcesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Cancel(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75296,27 +77844,27 @@ func (r *ProjectsLocationsMigratableResourcesOperationsService) Cancel(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsCancelCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsCancelCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -75334,13 +77882,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.cancel" call. // 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 *ProjectsLocationsMigratableResourcesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75372,7 +77920,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Do(opts ...go return ret, nil } -type ProjectsLocationsMigratableResourcesOperationsDeleteCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75386,8 +77934,8 @@ type ProjectsLocationsMigratableResourcesOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMigratableResourcesOperationsService) Delete(name string) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { - c := &ProjectsLocationsMigratableResourcesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Delete(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75395,27 +77943,27 @@ func (r *ProjectsLocationsMigratableResourcesOperationsService) Delete(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -75433,13 +77981,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.delete" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.delete" call. // 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 *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75471,7 +78019,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsMigratableResourcesOperationsGetCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75485,8 +78033,8 @@ type ProjectsLocationsMigratableResourcesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsMigratableResourcesOperationsService) Get(name string) *ProjectsLocationsMigratableResourcesOperationsGetCall { - c := &ProjectsLocationsMigratableResourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Get(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75494,7 +78042,7 @@ func (r *ProjectsLocationsMigratableResourcesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -75502,27 +78050,27 @@ func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Fields(s ...goog // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigratableResourcesOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -75543,13 +78091,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.get" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.get" call. // 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 *ProjectsLocationsMigratableResourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75581,7 +78129,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsMigratableResourcesOperationsListCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75594,28 +78142,28 @@ type ProjectsLocationsMigratableResourcesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMigratableResourcesOperationsService) List(name string) *ProjectsLocationsMigratableResourcesOperationsListCall { - c := &ProjectsLocationsMigratableResourcesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) List(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Filter(filter string) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Filter(filter string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -75623,7 +78171,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -75631,27 +78179,27 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Fields(s ...goo // IfNoneMatch sets an 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. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -75672,13 +78220,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.list" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.list" call. // 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 *ProjectsLocationsMigratableResourcesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75713,7 +78261,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Do(opts ...goog // 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 *ProjectsLocationsMigratableResourcesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -75731,7 +78279,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Pages(ctx conte } } -type ProjectsLocationsMigratableResourcesOperationsWaitCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75750,8 +78298,8 @@ type ProjectsLocationsMigratableResourcesOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMigratableResourcesOperationsService) Wait(name string) *ProjectsLocationsMigratableResourcesOperationsWaitCall { - c := &ProjectsLocationsMigratableResourcesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Wait(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75760,7 +78308,7 @@ func (r *ProjectsLocationsMigratableResourcesOperationsService) Wait(name string // 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 *ProjectsLocationsMigratableResourcesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMigratableResourcesOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -75768,27 +78316,27 @@ func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Timeout(timeout // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -75806,13 +78354,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.wait" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.wait" call. // 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 *ProjectsLocationsMigratableResourcesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75844,60 +78392,63 @@ func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsCopyCall struct { + s *Service + parent string + googlecloudaiplatformv1copymodelrequest *GoogleCloudAiplatformV1CopyModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a ModelDeploymentMonitoringJob. It will run periodically on -// a configured interval. +// Copy: Copies an already existing Vertex AI Model into the specified +// Location. The source Model must exist in the same Project. When copying +// custom Models, the users themselves are responsible for Model.metadata +// content to be region-agnostic, as well as making sure that any resources +// (e.g. files) it depends on remain accessible. // -// - parent: The parent of the ModelDeploymentMonitoringJob. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Create(parent string, googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location into which to copy the Model. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsModelsService) Copy(parent string, googlecloudaiplatformv1copymodelrequest *GoogleCloudAiplatformV1CopyModelRequest) *ProjectsLocationsModelsCopyCall { + c := &ProjectsLocationsModelsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1modeldeploymentmonitoringjob = googlecloudaiplatformv1modeldeploymentmonitoringjob + c.googlecloudaiplatformv1copymodelrequest = googlecloudaiplatformv1copymodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { +func (c *ProjectsLocationsModelsCopyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsCopyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { +func (c *ProjectsLocationsModelsCopyCall) Context(ctx context.Context) *ProjectsLocationsModelsCopyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsModelsCopyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsCopyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1modeldeploymentmonitoringjob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1copymodelrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/modelDeploymentMonitoringJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models:copy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -75910,13 +78461,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.create" call. +// Do executes the "aiplatform.projects.locations.models.copy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob.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 +// *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 *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelDeploymentMonitoringJob, error) { +func (c *ProjectsLocationsModelsCopyCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75935,7 +78486,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelDeploymentMonitoringJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75948,7 +78499,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall struct { +type ProjectsLocationsModelsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75956,13 +78507,13 @@ type ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a ModelDeploymentMonitoringJob. +// Delete: Deletes a Model. A model cannot be deleted if any Endpoint resource +// has a DeployedModel based on the model in its deployed_models field. // -// - name: The resource name of the model monitoring job to delete. Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Delete(name string) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Model resource to be deleted. Format: +// `projects/{project}/locations/{location}/models/{model}`. +func (r *ProjectsLocationsModelsService) Delete(name string) *ProjectsLocationsModelsDeleteCall { + c := &ProjectsLocationsModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75970,27 +78521,27 @@ func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Delete(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { +func (c *ProjectsLocationsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { +func (c *ProjectsLocationsModelsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -76008,13 +78559,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.delete" call. +// Do executes the "aiplatform.projects.locations.models.delete" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76046,7 +78597,213 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsGetCall struct { +type ProjectsLocationsModelsDeleteVersionCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DeleteVersion: Deletes a Model version. Model version can only be deleted if +// there are no DeployedModels created from it. Deleting the only version in +// the Model is not allowed. Use DeleteModel for deleting the Model instead. +// +// - name: The name of the model version to be deleted, with a version ID +// explicitly included. Example: +// `projects/{project}/locations/{location}/models/{model}@1234`. +func (r *ProjectsLocationsModelsService) DeleteVersion(name string) *ProjectsLocationsModelsDeleteVersionCall { + c := &ProjectsLocationsModelsDeleteVersionCall{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 +// details. +func (c *ProjectsLocationsModelsDeleteVersionCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteVersionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelsDeleteVersionCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteVersionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelsDeleteVersionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsModelsDeleteVersionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteVersion") + 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.models.deleteVersion" call. +// 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 *ProjectsLocationsModelsDeleteVersionCall) 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 +} + +type ProjectsLocationsModelsExportCall struct { + s *Service + name string + googlecloudaiplatformv1exportmodelrequest *GoogleCloudAiplatformV1ExportModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports a trained, exportable Model to a location specified by the +// user. A Model is considered to be exportable if it has at least one +// supported export format. +// +// - name: The resource name of the Model to export. The resource name may +// contain version id or version alias to specify the version, if no version +// is specified, the default version will be exported. +func (r *ProjectsLocationsModelsService) Export(name string, googlecloudaiplatformv1exportmodelrequest *GoogleCloudAiplatformV1ExportModelRequest) *ProjectsLocationsModelsExportCall { + c := &ProjectsLocationsModelsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1exportmodelrequest = googlecloudaiplatformv1exportmodelrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsModelsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelsExportCall) Context(ctx context.Context) *ProjectsLocationsModelsExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsModelsExportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportmodelrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") + 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.models.export" call. +// 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 *ProjectsLocationsModelsExportCall) 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 +} + +type ProjectsLocationsModelsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -76055,13 +78812,20 @@ type ProjectsLocationsModelDeploymentMonitoringJobsGetCall struct { header_ http.Header } -// Get: Gets a ModelDeploymentMonitoringJob. +// Get: Gets a Model. // -// - name: The resource name of the ModelDeploymentMonitoringJob. Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Get(name string) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Model resource. Format: +// `projects/{project}/locations/{location}/models/{model}` In order to +// retrieve a specific version of the model, also provide the version ID or +// version alias. Example: +// `projects/{project}/locations/{location}/models/{model}@2` or +// `projects/{project}/locations/{location}/models/{model}@golden` If no +// version ID or alias is specified, the "default" version will be returned. +// The "default" version alias is created for the first version of the model, +// and can be moved to other versions later on. There will be exactly one +// default version. +func (r *ProjectsLocationsModelsService) Get(name string) *ProjectsLocationsModelsGetCall { + c := &ProjectsLocationsModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -76069,62 +78833,178 @@ func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { +func (c *ProjectsLocationsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsModelsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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.models.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1Model.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 *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, 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 := &GoogleCloudAiplatformV1Model{ + 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 +} + +type ProjectsLocationsModelsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsModelsService) GetIamPolicy(resource string) *ProjectsLocationsModelsGetIamPolicyCall { + c := &ProjectsLocationsModelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsModelsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsModelsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsModelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { +func (c *ProjectsLocationsModelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsModelsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.get" call. +// Do executes the "aiplatform.projects.locations.models.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob.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 *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelDeploymentMonitoringJob, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76143,7 +79023,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelDeploymentMonitoringJob{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76156,7 +79036,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsListCall struct { +type ProjectsLocationsModelsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -76165,49 +79045,58 @@ type ProjectsLocationsModelDeploymentMonitoringJobsListCall struct { header_ http.Header } -// List: Lists ModelDeploymentMonitoringJobs in a Location. +// List: Lists Models in a Location. // -// - parent: The parent of the ModelDeploymentMonitoringJob. Format: +// - parent: The resource name of the Location to list the Models from. Format: // `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) List(parent string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelsService) List(parent string) *ProjectsLocationsModelsListCall { + c := &ProjectsLocationsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Filter(filter string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `model` supports = and !=. `model` represents the Model ID, +// i.e. the last segment of the Model's resource name. * `display_name` +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". * +// `base_model_name` only supports = Some examples: * `model=1234` * +// `displayName="myDisplayName" * `labels.myKey="myValue" * +// `baseModelName="text-bison" +func (c *ProjectsLocationsModelsListCall) Filter(filter string) *ProjectsLocationsModelsListCall { c.urlParams_.Set("filter", filter) return c } +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsModelsListCall) OrderBy(orderBy string) *ProjectsLocationsModelsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) PageSize(pageSize int64) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +func (c *ProjectsLocationsModelsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) PageToken(pageToken string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +// token. Typically obtained via ListModelsResponse.next_page_token of the +// previous ModelService.ListModels call. +func (c *ProjectsLocationsModelsListCall) PageToken(pageToken string) *ProjectsLocationsModelsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) ReadMask(readMask string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +// fields to read. +func (c *ProjectsLocationsModelsListCall) ReadMask(readMask string) *ProjectsLocationsModelsListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -76215,7 +79104,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) ReadMask(readMa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +func (c *ProjectsLocationsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76223,27 +79112,27 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Fields(s ...goo // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +func (c *ProjectsLocationsModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +func (c *ProjectsLocationsModelsListCall) Context(ctx context.Context) *ProjectsLocationsModelsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Header() http.Header { +func (c *ProjectsLocationsModelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -76251,7 +79140,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/modelDeploymentMonitoringJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -76264,13 +79153,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.list" call. +// Do executes the "aiplatform.projects.locations.models.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse.ServerRespo -// nse.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 *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse, error) { +// *GoogleCloudAiplatformV1ListModelsResponse.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 *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76289,7 +79178,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse{ + ret := &GoogleCloudAiplatformV1ListModelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76305,7 +79194,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Do(opts ...goog // 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 *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse) error) error { +func (c *ProjectsLocationsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -76323,87 +79212,108 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Pages(ctx conte } } -type ProjectsLocationsModelDeploymentMonitoringJobsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsListVersionsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ModelDeploymentMonitoringJob. +// ListVersions: Lists versions of the specified model. // -// - name: Output only. Resource name of a ModelDeploymentMonitoringJob. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Patch(name string, googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the model to list versions for. +func (r *ProjectsLocationsModelsService) ListVersions(name string) *ProjectsLocationsModelsListVersionsCall { + c := &ProjectsLocationsModelsListVersionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1modeldeploymentmonitoringjob = googlecloudaiplatformv1modeldeploymentmonitoringjob return c } -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask is used to specify the fields to be overwritten in the -// ModelDeploymentMonitoringJob resource by the update. The fields specified in -// the update_mask are relative to the resource, not the full request. A field -// will be overwritten if it is in the mask. If the user does not provide a -// mask then only the non-empty fields present in the request will be -// overwritten. Set the update_mask to `*` to override all fields. For the -// objective config, the user can either provide the update mask for -// model_deployment_monitoring_objective_configs or any combination of its -// nested fields, such as: -// model_deployment_monitoring_objective_configs.objective_config.training_datas -// et. Updatable fields: * `display_name` * -// `model_deployment_monitoring_schedule_config` * -// `model_monitoring_alert_config` * `logging_sampling_strategy` * `labels` * -// `log_ttl` * `enable_monitoring_pipeline_logs` . and * -// `model_deployment_monitoring_objective_configs` . or * -// `model_deployment_monitoring_objective_configs.objective_config.training_data -// set` * -// `model_deployment_monitoring_objective_configs.objective_config.training_pred -// iction_skew_detection_config` * -// `model_deployment_monitoring_objective_configs.objective_config.prediction_dr -// ift_detection_config` -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `labels.myKey="myValue" +func (c *ProjectsLocationsModelsListVersionsCall) Filter(filter string) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `create_time` * `update_time` Example: +// `update_time asc, create_time desc`. +func (c *ProjectsLocationsModelsListVersionsCall) OrderBy(orderBy string) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsListVersionsCall) PageSize(pageSize int64) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via next_page_token of the previous +// ListModelVersions call. +func (c *ProjectsLocationsModelsListVersionsCall) PageToken(pageToken string) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsModelsListVersionsCall) ReadMask(readMask string) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { +func (c *ProjectsLocationsModelsListVersionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListVersionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsModelsListVersionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListVersionsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { +func (c *ProjectsLocationsModelsListVersionsCall) Context(ctx context.Context) *ProjectsLocationsModelsListVersionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Header() http.Header { +func (c *ProjectsLocationsModelsListVersionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1modeldeploymentmonitoringjob) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsListVersionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listVersions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -76414,13 +79324,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.patch" call. +// Do executes the "aiplatform.projects.locations.models.listVersions" call. // 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 +// *GoogleCloudAiplatformV1ListModelVersionsResponse.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 *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsListVersionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelVersionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76439,7 +79349,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListModelVersionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76452,63 +79362,81 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsPauseCall struct { - s *Service - name string - googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsModelsListVersionsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Pause: Pauses a ModelDeploymentMonitoringJob. If the job is running, the -// server makes a best effort to cancel the job. Will mark -// ModelDeploymentMonitoringJob.state to 'PAUSED'. +type ProjectsLocationsModelsMergeVersionAliasesCall struct { + s *Service + name string + googlecloudaiplatformv1mergeversionaliasesrequest *GoogleCloudAiplatformV1MergeVersionAliasesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MergeVersionAliases: Merges a set of aliases for a Model version. // -// - name: The resource name of the ModelDeploymentMonitoringJob to pause. -// Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Pause(name string, googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the model version to merge aliases, with a version ID +// explicitly included. Example: +// `projects/{project}/locations/{location}/models/{model}@1234`. +func (r *ProjectsLocationsModelsService) MergeVersionAliases(name string, googlecloudaiplatformv1mergeversionaliasesrequest *GoogleCloudAiplatformV1MergeVersionAliasesRequest) *ProjectsLocationsModelsMergeVersionAliasesCall { + c := &ProjectsLocationsModelsMergeVersionAliasesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest = googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest + c.googlecloudaiplatformv1mergeversionaliasesrequest = googlecloudaiplatformv1mergeversionaliasesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsMergeVersionAliasesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Context(ctx context.Context) *ProjectsLocationsModelsMergeVersionAliasesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Header() http.Header { +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1mergeversionaliasesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:pause") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:mergeVersionAliases") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76521,13 +79449,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.pause" call. +// Do executes the "aiplatform.projects.locations.models.mergeVersionAliases" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1Model.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 *ProjectsLocationsModelsMergeVersionAliasesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76546,7 +79474,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1Model{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76559,65 +79487,68 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsResumeCall struct { - s *Service - name string - googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1model *GoogleCloudAiplatformV1Model + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resume: Resumes a paused ModelDeploymentMonitoringJob. It will start to run -// from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be -// resumed. +// Patch: Updates a Model. // -// - name: The resource name of the ModelDeploymentMonitoringJob to resume. -// Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Resume(name string, googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Model. +func (r *ProjectsLocationsModelsService) Patch(name string, googlecloudaiplatformv1model *GoogleCloudAiplatformV1Model) *ProjectsLocationsModelsPatchCall { + c := &ProjectsLocationsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest = googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest + c.googlecloudaiplatformv1model = googlecloudaiplatformv1model + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. +func (c *ProjectsLocationsModelsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsModelsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { +func (c *ProjectsLocationsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { +func (c *ProjectsLocationsModelsPatchCall) Context(ctx context.Context) *ProjectsLocationsModelsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Header() http.Header { +func (c *ProjectsLocationsModelsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1model) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -76628,13 +79559,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.resume" call. +// Do executes the "aiplatform.projects.locations.models.patch" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1Model.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 *ProjectsLocationsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76653,7 +79584,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1Model{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76666,62 +79597,62 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Do(opts ...go return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall struct { - s *Service - modelDeploymentMonitoringJob string - googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchModelDeploymentMonitoringStatsAnomalies: Searches Model Monitoring -// Statistics generated within a given time window. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// - modelDeploymentMonitoringJob: ModelDeploymentMonitoring Job resource name. -// Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) SearchModelDeploymentMonitoringStatsAnomalies(modelDeploymentMonitoringJob string, googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.modelDeploymentMonitoringJob = modelDeploymentMonitoringJob - c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest = googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsModelsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsModelsSetIamPolicyCall { + c := &ProjectsLocationsModelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { +func (c *ProjectsLocationsModelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { +func (c *ProjectsLocationsModelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsModelsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Header() http.Header { +func (c *ProjectsLocationsModelsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+modelDeploymentMonitoringJob}:searchModelDeploymentMonitoringStatsAnomalies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76729,18 +79660,18 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMoni } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "modelDeploymentMonitoringJob": c.modelDeploymentMonitoringJob, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.searchModelDeploymentMonitoringStatsAnomalies" call. +// Do executes the "aiplatform.projects.locations.models.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse -// .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 *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76759,7 +79690,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMoni if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76772,83 +79703,68 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMoni return ret, nil } -// 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 *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { - c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken = pt - }(c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken = x.NextPageToken - } -} - -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall struct { +type ProjectsLocationsModelsTestIamPermissionsCall struct { s *Service - name string + resource string urlParams_ gensupport.URLParams ctx_ context.Context 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`. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Cancel(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsModelsService) TestIamPermissions(resource string) *ProjectsLocationsModelsTestIamPermissionsCall { + c := &ProjectsLocationsModelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// Permissions sets the optional parameter "permissions": The set of +// permissions to check for the `resource`. Permissions with wildcards (such as +// `*` or `storage.*`) are not allowed. For more information see IAM Overview +// (https://cloud.google.com/iam/docs/overview#permissions). +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsModelsTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsModelsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76856,18 +79772,18 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) doR } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.models.testIamPermissions" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsModelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76886,7 +79802,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76899,74 +79815,79 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Do( return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsUpdateExplanationDatasetCall struct { + s *Service + model string + googlecloudaiplatformv1updateexplanationdatasetrequest *GoogleCloudAiplatformV1UpdateExplanationDatasetRequest + 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`. +// UpdateExplanationDataset: Incrementally update the dataset used for an +// examples model. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Delete(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - model: The resource name of the Model to update. Format: +// `projects/{project}/locations/{location}/models/{model}`. +func (r *ProjectsLocationsModelsService) UpdateExplanationDataset(model string, googlecloudaiplatformv1updateexplanationdatasetrequest *GoogleCloudAiplatformV1UpdateExplanationDatasetRequest) *ProjectsLocationsModelsUpdateExplanationDatasetCall { + c := &ProjectsLocationsModelsUpdateExplanationDatasetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1updateexplanationdatasetrequest = googlecloudaiplatformv1updateexplanationdatasetrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { +func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsUpdateExplanationDatasetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { +func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Context(ctx context.Context) *ProjectsLocationsModelsUpdateExplanationDatasetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1updateexplanationdatasetrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:updateExplanationDataset") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.models.updateExplanationDataset" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsModelsUpdateExplanationDatasetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76985,7 +79906,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Do( 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, @@ -76998,85 +79919,78 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Do( return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsUploadCall struct { + s *Service + parent string + googlecloudaiplatformv1uploadmodelrequest *GoogleCloudAiplatformV1UploadModelRequest + urlParams_ gensupport.URLParams + 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. +// Upload: Uploads a Model artifact into Vertex AI. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Get(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location into which to upload the Model. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsModelsService) Upload(parent string, googlecloudaiplatformv1uploadmodelrequest *GoogleCloudAiplatformV1UploadModelRequest) *ProjectsLocationsModelsUploadCall { + c := &ProjectsLocationsModelsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1uploadmodelrequest = googlecloudaiplatformv1uploadmodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { +func (c *ProjectsLocationsModelsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsUploadCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { +func (c *ProjectsLocationsModelsUploadCall) Context(ctx context.Context) *ProjectsLocationsModelsUploadCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelsUploadCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsModelsUploadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1uploadmodelrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models:upload") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.models.upload" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsUploadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77108,7 +80022,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Do(opt return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall struct { +type ProjectsLocationsModelsEvaluationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -77117,40 +80031,21 @@ type ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall struct { 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`. +// Get: Gets a ModelEvaluation. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) List(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the ModelEvaluation resource. Format: +// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua +// tion}`. +func (r *ProjectsLocationsModelsEvaluationsService) Get(name string) *ProjectsLocationsModelsEvaluationsGetCall { + c := &ProjectsLocationsModelsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Filter(filter string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { - 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 // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { +func (c *ProjectsLocationsModelsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77158,27 +80053,27 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Field // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { +func (c *ProjectsLocationsModelsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { +func (c *ProjectsLocationsModelsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -77186,7 +80081,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) doReq var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -77199,13 +80094,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.list" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ModelEvaluation.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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsModelsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77224,7 +80119,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ModelEvaluation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77237,90 +80132,59 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Do(op return ret, nil } -// 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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsEvaluationsImportCall struct { + s *Service + parent string + googlecloudaiplatformv1importmodelevaluationrequest *GoogleCloudAiplatformV1ImportModelEvaluationRequest + 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. +// Import: Imports an externally generated ModelEvaluation. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Wait(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall{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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - parent: The name of the parent model resource. Format: +// `projects/{project}/locations/{location}/models/{model}`. +func (r *ProjectsLocationsModelsEvaluationsService) Import(parent string, googlecloudaiplatformv1importmodelevaluationrequest *GoogleCloudAiplatformV1ImportModelEvaluationRequest) *ProjectsLocationsModelsEvaluationsImportCall { + c := &ProjectsLocationsModelsEvaluationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1importmodelevaluationrequest = googlecloudaiplatformv1importmodelevaluationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { +func (c *ProjectsLocationsModelsEvaluationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { +func (c *ProjectsLocationsModelsEvaluationsImportCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsModelsEvaluationsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importmodelevaluationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -77328,18 +80192,18 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) doReq } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.import" call. // 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 +// *GoogleCloudAiplatformV1ModelEvaluation.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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsEvaluationsImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77358,7 +80222,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ModelEvaluation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77371,65 +80235,95 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Do(op return ret, nil } -type ProjectsLocationsModelsCopyCall struct { - s *Service - parent string - googlecloudaiplatformv1copymodelrequest *GoogleCloudAiplatformV1CopyModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsEvaluationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Copy: Copies an already existing Vertex AI Model into the specified -// Location. The source Model must exist in the same Project. When copying -// custom Models, the users themselves are responsible for Model.metadata -// content to be region-agnostic, as well as making sure that any resources -// (e.g. files) it depends on remain accessible. +// List: Lists ModelEvaluations in a Model. // -// - parent: The resource name of the Location into which to copy the Model. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelsService) Copy(parent string, googlecloudaiplatformv1copymodelrequest *GoogleCloudAiplatformV1CopyModelRequest) *ProjectsLocationsModelsCopyCall { - c := &ProjectsLocationsModelsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Model to list the ModelEvaluations from. +// Format: `projects/{project}/locations/{location}/models/{model}`. +func (r *ProjectsLocationsModelsEvaluationsService) List(parent string) *ProjectsLocationsModelsEvaluationsListCall { + c := &ProjectsLocationsModelsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1copymodelrequest = googlecloudaiplatformv1copymodelrequest + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsModelsEvaluationsListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListModelEvaluationsResponse.next_page_token +// of the previous ModelService.ListModelEvaluations call. +func (c *ProjectsLocationsModelsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsModelsEvaluationsListCall) ReadMask(readMask string) *ProjectsLocationsModelsEvaluationsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsCopyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsCopyCall { +func (c *ProjectsLocationsModelsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsModelsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsCopyCall) Context(ctx context.Context) *ProjectsLocationsModelsCopyCall { +func (c *ProjectsLocationsModelsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsCopyCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsCopyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1copymodelrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+parent}/models:copy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -77440,13 +80334,13 @@ func (c *ProjectsLocationsModelsCopyCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.copy" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.list" call. // 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 +// *GoogleCloudAiplatformV1ListModelEvaluationsResponse.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 *ProjectsLocationsModelsCopyCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelEvaluationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77465,7 +80359,7 @@ func (c *ProjectsLocationsModelsCopyCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListModelEvaluationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77478,7 +80372,28 @@ func (c *ProjectsLocationsModelsCopyCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -type ProjectsLocationsModelsDeleteCall struct { +// 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 *ProjectsLocationsModelsEvaluationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelEvaluationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsModelsEvaluationsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -77486,13 +80401,19 @@ type ProjectsLocationsModelsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Model. A model cannot be deleted if any Endpoint resource -// has a DeployedModel based on the model in its deployed_models field. +// 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`. // -// - name: The name of the Model resource to be deleted. Format: -// `projects/{project}/locations/{location}/models/{model}`. -func (r *ProjectsLocationsModelsService) Delete(name string) *ProjectsLocationsModelsDeleteCall { - c := &ProjectsLocationsModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) Cancel(name string) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { + c := &ProjectsLocationsModelsEvaluationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -77500,34 +80421,34 @@ func (r *ProjectsLocationsModelsService) Delete(name string) *ProjectsLocationsM // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -77538,13 +80459,13 @@ func (c *ProjectsLocationsModelsDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.delete" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.cancel" call. // 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 *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77563,7 +80484,7 @@ func (c *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*G 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, @@ -77576,7 +80497,7 @@ func (c *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsModelsDeleteVersionCall struct { +type ProjectsLocationsModelsEvaluationsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -77584,15 +80505,14 @@ type ProjectsLocationsModelsDeleteVersionCall struct { header_ http.Header } -// DeleteVersion: Deletes a Model version. Model version can only be deleted if -// there are no DeployedModels created from it. Deleting the only version in -// the Model is not allowed. Use DeleteModel for deleting the Model instead. +// 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 model version to be deleted, with a version ID -// explicitly included. Example: -// `projects/{project}/locations/{location}/models/{model}@1234`. -func (r *ProjectsLocationsModelsService) DeleteVersion(name string) *ProjectsLocationsModelsDeleteVersionCall { - c := &ProjectsLocationsModelsDeleteVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) Delete(name string) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { + c := &ProjectsLocationsModelsEvaluationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -77600,32 +80520,32 @@ func (r *ProjectsLocationsModelsService) DeleteVersion(name string) *ProjectsLoc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsDeleteVersionCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteVersionCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsDeleteVersionCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteVersionCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsDeleteVersionCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsDeleteVersionCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteVersion") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -77638,13 +80558,13 @@ func (c *ProjectsLocationsModelsDeleteVersionCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.deleteVersion" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.delete" call. // 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 *ProjectsLocationsModelsDeleteVersionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77663,7 +80583,7 @@ func (c *ProjectsLocationsModelsDeleteVersionCall) Do(opts ...googleapi.CallOpti 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, @@ -77673,67 +80593,71 @@ func (c *ProjectsLocationsModelsDeleteVersionCall) Do(opts ...googleapi.CallOpti if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil -} - -type ProjectsLocationsModelsExportCall struct { - s *Service - name string - googlecloudaiplatformv1exportmodelrequest *GoogleCloudAiplatformV1ExportModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + return ret, nil } -// Export: Exports a trained, exportable Model to a location specified by the -// user. A Model is considered to be exportable if it has at least one -// supported export format. +type ProjectsLocationsModelsEvaluationsOperationsGetCall 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 resource name of the Model to export. The resource name may -// contain version id or version alias to specify the version, if no version -// is specified, the default version will be exported. -func (r *ProjectsLocationsModelsService) Export(name string, googlecloudaiplatformv1exportmodelrequest *GoogleCloudAiplatformV1ExportModelRequest) *ProjectsLocationsModelsExportCall { - c := &ProjectsLocationsModelsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) Get(name string) *ProjectsLocationsModelsEvaluationsOperationsGetCall { + c := &ProjectsLocationsModelsEvaluationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1exportmodelrequest = googlecloudaiplatformv1exportmodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsExportCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsExportCall) Context(ctx context.Context) *ProjectsLocationsModelsExportCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsExportCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsExportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportmodelrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:export") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -77744,13 +80668,13 @@ func (c *ProjectsLocationsModelsExportCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.export" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.get" call. // 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 *ProjectsLocationsModelsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77782,7 +80706,7 @@ func (c *ProjectsLocationsModelsExportCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsModelsGetCall struct { +type ProjectsLocationsModelsEvaluationsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -77791,28 +80715,40 @@ type ProjectsLocationsModelsGetCall struct { header_ http.Header } -// Get: Gets a Model. +// 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 Model resource. Format: -// `projects/{project}/locations/{location}/models/{model}` In order to -// retrieve a specific version of the model, also provide the version ID or -// version alias. Example: -// `projects/{project}/locations/{location}/models/{model}@2` or -// `projects/{project}/locations/{location}/models/{model}@golden` If no -// version ID or alias is specified, the "default" version will be returned. -// The "default" version alias is created for the first version of the model, -// and can be moved to other versions later on. There will be exactly one -// default version. -func (r *ProjectsLocationsModelsService) Get(name string) *ProjectsLocationsModelsGetCall { - c := &ProjectsLocationsModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) List(name string) *ProjectsLocationsModelsEvaluationsOperationsListCall { + c := &ProjectsLocationsModelsEvaluationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsOperationsListCall { + 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 // details. -func (c *ProjectsLocationsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77820,27 +80756,27 @@ func (c *ProjectsLocationsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsL // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsGetCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsGetCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -77848,7 +80784,7 @@ func (c *ProjectsLocationsModelsGetCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -77861,13 +80797,13 @@ func (c *ProjectsLocationsModelsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.get" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Model.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77886,7 +80822,7 @@ func (c *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Model{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77899,72 +80835,90 @@ func (c *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*Goog return ret, nil } -type ProjectsLocationsModelsGetIamPolicyCall struct { +// 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 *ProjectsLocationsModelsEvaluationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsModelsEvaluationsOperationsWaitCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// 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. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsModelsService) GetIamPolicy(resource string) *ProjectsLocationsModelsGetIamPolicyCall { - c := &ProjectsLocationsModelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) Wait(name string) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { + c := &ProjectsLocationsModelsEvaluationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no -// conditional role bindings may specify any valid value or leave the field -// unset. The policy in the response might use the policy version that you -// specified, or it might use a lower policy version. For example, if you -// specify version 3, but the policy has no conditional role bindings, the -// response uses version 1. To learn which resources support conditions in -// their IAM policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsModelsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsModelsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// 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 *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsModelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetIamPolicyCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsModelsGetIamPolicyCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -77972,18 +80926,18 @@ func (c *ProjectsLocationsModelsGetIamPolicyCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78002,7 +80956,7 @@ func (c *ProjectsLocationsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78015,113 +80969,62 @@ func (c *ProjectsLocationsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsModelsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsEvaluationsSlicesBatchImportCall struct { + s *Service + parent string + googlecloudaiplatformv1batchimportevaluatedannotationsrequest *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Models in a Location. +// BatchImport: Imports a list of externally generated EvaluatedAnnotations. // -// - parent: The resource name of the Location to list the Models from. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelsService) List(parent string) *ProjectsLocationsModelsListCall { - c := &ProjectsLocationsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the parent ModelEvaluationSlice resource. Format: +// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua +// tion}/slices/{slice}`. +func (r *ProjectsLocationsModelsEvaluationsSlicesService) BatchImport(parent string, googlecloudaiplatformv1batchimportevaluatedannotationsrequest *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { + c := &ProjectsLocationsModelsEvaluationsSlicesBatchImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `model` supports = and !=. `model` represents the Model ID, -// i.e. the last segment of the Model's resource name. * `display_name` -// supports = and != * `labels` supports general map functions that is: * -// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key -// existence * A key including a space must be quoted. `labels."a key". * -// `base_model_name` only supports = Some examples: * `model=1234` * -// `displayName="myDisplayName" * `labels.myKey="myValue" * -// `baseModelName="text-bison" -func (c *ProjectsLocationsModelsListCall) Filter(filter string) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `display_name` * `create_time` * -// `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsModelsListCall) OrderBy(orderBy string) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsModelsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListModelsResponse.next_page_token of the -// previous ModelService.ListModels call. -func (c *ProjectsLocationsModelsListCall) PageToken(pageToken string) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsModelsListCall) ReadMask(readMask string) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("readMask", readMask) + c.googlecloudaiplatformv1batchimportevaluatedannotationsrequest = googlecloudaiplatformv1batchimportevaluatedannotationsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsListCall) Context(ctx context.Context) *ProjectsLocationsModelsListCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsListCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchimportevaluatedannotationsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:batchImport") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -78132,13 +81035,13 @@ func (c *ProjectsLocationsModelsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.list" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.slices.batchImport" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelsResponse.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 *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelsResponse, error) { +// *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse.ServerRespons +// e.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 *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78157,7 +81060,7 @@ func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelsResponse{ + ret := &GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78170,28 +81073,7 @@ func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -// 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 *ProjectsLocationsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsModelsListVersionsCall struct { +type ProjectsLocationsModelsEvaluationsSlicesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -78200,61 +81082,21 @@ type ProjectsLocationsModelsListVersionsCall struct { header_ http.Header } -// ListVersions: Lists versions of the specified model. +// Get: Gets a ModelEvaluationSlice. // -// - name: The name of the model to list versions for. -func (r *ProjectsLocationsModelsService) ListVersions(name string) *ProjectsLocationsModelsListVersionsCall { - c := &ProjectsLocationsModelsListVersionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the ModelEvaluationSlice resource. Format: +// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua +// tion}/slices/{slice}`. +func (r *ProjectsLocationsModelsEvaluationsSlicesService) Get(name string) *ProjectsLocationsModelsEvaluationsSlicesGetCall { + c := &ProjectsLocationsModelsEvaluationsSlicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `labels` supports general map functions that is: * -// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key -// existence * A key including a space must be quoted. `labels."a key". Some -// examples: * `labels.myKey="myValue" -func (c *ProjectsLocationsModelsListVersionsCall) Filter(filter string) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `create_time` * `update_time` Example: -// `update_time asc, create_time desc`. -func (c *ProjectsLocationsModelsListVersionsCall) OrderBy(orderBy string) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsModelsListVersionsCall) PageSize(pageSize int64) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via next_page_token of the previous -// ListModelVersions call. -func (c *ProjectsLocationsModelsListVersionsCall) PageToken(pageToken string) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsModelsListVersionsCall) ReadMask(readMask string) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsListVersionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListVersionsCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -78262,27 +81104,27 @@ func (c *ProjectsLocationsModelsListVersionsCall) Fields(s ...googleapi.Field) * // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsListVersionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListVersionsCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsSlicesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsListVersionsCall) Context(ctx context.Context) *ProjectsLocationsModelsListVersionsCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsListVersionsCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsListVersionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -78290,7 +81132,7 @@ func (c *ProjectsLocationsModelsListVersionsCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -78303,13 +81145,13 @@ func (c *ProjectsLocationsModelsListVersionsCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.listVersions" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.slices.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelVersionsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ModelEvaluationSlice.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 *ProjectsLocationsModelsListVersionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelVersionsResponse, error) { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluationSlice, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78328,7 +81170,7 @@ func (c *ProjectsLocationsModelsListVersionsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelVersionsResponse{ + ret := &GoogleCloudAiplatformV1ModelEvaluationSlice{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78341,100 +81183,116 @@ func (c *ProjectsLocationsModelsListVersionsCall) Do(opts ...googleapi.CallOptio return ret, nil } -// 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 *ProjectsLocationsModelsListVersionsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelVersionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } +type ProjectsLocationsModelsEvaluationsSlicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsModelsMergeVersionAliasesCall struct { - s *Service - name string - googlecloudaiplatformv1mergeversionaliasesrequest *GoogleCloudAiplatformV1MergeVersionAliasesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// List: Lists ModelEvaluationSlices in a ModelEvaluation. +// +// - parent: The resource name of the ModelEvaluation to list the +// ModelEvaluationSlices from. Format: +// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua +// tion}`. +func (r *ProjectsLocationsModelsEvaluationsSlicesService) List(parent string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c := &ProjectsLocationsModelsEvaluationsSlicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c } -// MergeVersionAliases: Merges a set of aliases for a Model version. -// -// - name: The name of the model version to merge aliases, with a version ID -// explicitly included. Example: -// `projects/{project}/locations/{location}/models/{model}@1234`. -func (r *ProjectsLocationsModelsService) MergeVersionAliases(name string, googlecloudaiplatformv1mergeversionaliasesrequest *GoogleCloudAiplatformV1MergeVersionAliasesRequest) *ProjectsLocationsModelsMergeVersionAliasesCall { - c := &ProjectsLocationsModelsMergeVersionAliasesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1mergeversionaliasesrequest = googlecloudaiplatformv1mergeversionaliasesrequest +// Filter sets the optional parameter "filter": The standard list filter. * +// `slice.dimension` - for =. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via +// ListModelEvaluationSlicesResponse.next_page_token of the previous +// ModelService.ListModelEvaluationSlices call. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) ReadMask(readMask string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsMergeVersionAliasesCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Context(ctx context.Context) *ProjectsLocationsModelsMergeVersionAliasesCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1mergeversionaliasesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:mergeVersionAliases") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/slices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.mergeVersionAliases" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.slices.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Model.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 *ProjectsLocationsModelsMergeVersionAliasesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { +// *GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse.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 *ProjectsLocationsModelsEvaluationsSlicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78453,7 +81311,7 @@ func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Model{ + ret := &GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78466,68 +81324,83 @@ func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsModelsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1model *GoogleCloudAiplatformV1Model - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsModelsEvaluationsSlicesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Patch: Updates a Model. -// -// - name: The resource name of the Model. -func (r *ProjectsLocationsModelsService) Patch(name string, googlecloudaiplatformv1model *GoogleCloudAiplatformV1Model) *ProjectsLocationsModelsPatchCall { - c := &ProjectsLocationsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1model = googlecloudaiplatformv1model - return c +type ProjectsLocationsModelsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. -func (c *ProjectsLocationsModelsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsModelsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// 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`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsModelsOperationsService) Cancel(name string) *ProjectsLocationsModelsOperationsCancelCall { + c := &ProjectsLocationsModelsOperationsCancelCall{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 // details. -func (c *ProjectsLocationsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsPatchCall { +func (c *ProjectsLocationsModelsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsPatchCall) Context(ctx context.Context) *ProjectsLocationsModelsPatchCall { +func (c *ProjectsLocationsModelsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsPatchCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsModelsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1model) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -78538,13 +81411,13 @@ func (c *ProjectsLocationsModelsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.patch" call. +// Do executes the "aiplatform.projects.locations.models.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Model.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 *ProjectsLocationsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { +// *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 *ProjectsLocationsModelsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78563,7 +81436,7 @@ func (c *ProjectsLocationsModelsPatchCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Model{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78576,81 +81449,74 @@ func (c *ProjectsLocationsModelsPatchCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsModelsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +// 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`. // -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsModelsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsModelsSetIamPolicyCall { - c := &ProjectsLocationsModelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsModelsOperationsService) Delete(name string) *ProjectsLocationsModelsOperationsDeleteCall { + c := &ProjectsLocationsModelsOperationsDeleteCall{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 // details. -func (c *ProjectsLocationsModelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsSetIamPolicyCall { +func (c *ProjectsLocationsModelsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsModelsSetIamPolicyCall { +func (c *ProjectsLocationsModelsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsModelsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.models.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsModelsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78669,7 +81535,7 @@ func (c *ProjectsLocationsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78682,87 +81548,85 @@ func (c *ProjectsLocationsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsModelsTestIamPermissionsCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// 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. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsModelsService) TestIamPermissions(resource string) *ProjectsLocationsModelsTestIamPermissionsCall { - c := &ProjectsLocationsModelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Permissions sets the optional parameter "permissions": The set of -// permissions to check for the `resource`. Permissions with wildcards (such as -// `*` or `storage.*`) are not allowed. For more information see IAM Overview -// (https://cloud.google.com/iam/docs/overview#permissions). -func (c *ProjectsLocationsModelsTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsModelsTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// - name: The name of the operation resource. +func (r *ProjectsLocationsModelsOperationsService) Get(name string) *ProjectsLocationsModelsOperationsGetCall { + c := &ProjectsLocationsModelsOperationsGetCall{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 // details. -func (c *ProjectsLocationsModelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsTestIamPermissionsCall { +func (c *ProjectsLocationsModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsModelsTestIamPermissionsCall { +func (c *ProjectsLocationsModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.models.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsModelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78781,7 +81645,7 @@ func (c *ProjectsLocationsModelsTestIamPermissionsCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78794,79 +81658,104 @@ func (c *ProjectsLocationsModelsTestIamPermissionsCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsModelsUpdateExplanationDatasetCall struct { - s *Service - model string - googlecloudaiplatformv1updateexplanationdatasetrequest *GoogleCloudAiplatformV1UpdateExplanationDatasetRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateExplanationDataset: Incrementally update the dataset used for an -// examples model. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - model: The resource name of the Model to update. Format: -// `projects/{project}/locations/{location}/models/{model}`. -func (r *ProjectsLocationsModelsService) UpdateExplanationDataset(model string, googlecloudaiplatformv1updateexplanationdatasetrequest *GoogleCloudAiplatformV1UpdateExplanationDatasetRequest) *ProjectsLocationsModelsUpdateExplanationDatasetCall { - c := &ProjectsLocationsModelsUpdateExplanationDatasetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1updateexplanationdatasetrequest = googlecloudaiplatformv1updateexplanationdatasetrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsModelsOperationsService) List(name string) *ProjectsLocationsModelsOperationsListCall { + c := &ProjectsLocationsModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsModelsOperationsListCall) Filter(filter string) *ProjectsLocationsModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsOperationsListCall { + 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 // details. -func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsUpdateExplanationDatasetCall { +func (c *ProjectsLocationsModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Context(ctx context.Context) *ProjectsLocationsModelsUpdateExplanationDatasetCall { +func (c *ProjectsLocationsModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1updateexplanationdatasetrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+model}:updateExplanationDataset") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "model": c.model, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.updateExplanationDataset" call. +// Do executes the "aiplatform.projects.locations.models.operations.list" call. // 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 +// *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 *ProjectsLocationsModelsUpdateExplanationDatasetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78885,7 +81774,7 @@ func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78898,59 +81787,90 @@ func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsModelsUploadCall struct { - s *Service - parent string - googlecloudaiplatformv1uploadmodelrequest *GoogleCloudAiplatformV1UploadModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Upload: Uploads a Model artifact into Vertex AI. +type ProjectsLocationsModelsOperationsWaitCall 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. // -// - parent: The resource name of the Location into which to upload the Model. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelsService) Upload(parent string, googlecloudaiplatformv1uploadmodelrequest *GoogleCloudAiplatformV1UploadModelRequest) *ProjectsLocationsModelsUploadCall { - c := &ProjectsLocationsModelsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1uploadmodelrequest = googlecloudaiplatformv1uploadmodelrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsModelsOperationsService) Wait(name string) *ProjectsLocationsModelsOperationsWaitCall { + c := &ProjectsLocationsModelsOperationsWaitCall{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 *ProjectsLocationsModelsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsModelsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsUploadCall { +func (c *ProjectsLocationsModelsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsUploadCall) Context(ctx context.Context) *ProjectsLocationsModelsUploadCall { +func (c *ProjectsLocationsModelsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsUploadCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsUploadCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsModelsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1uploadmodelrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models:upload") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -78958,18 +81878,18 @@ func (c *ProjectsLocationsModelsUploadCall) doRequest(alt string) (*http.Respons } 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.models.upload" call. +// Do executes the "aiplatform.projects.locations.models.operations.wait" call. // 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 *ProjectsLocationsModelsUploadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79001,68 +81921,68 @@ func (c *ProjectsLocationsModelsUploadCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsModelsEvaluationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelnasjobrequest *GoogleCloudAiplatformV1CancelNasJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a ModelEvaluation. +// Cancel: Cancels a NasJob. Starts asynchronous cancellation on the NasJob. +// The server makes a best effort to cancel the job, but success is not +// guaranteed. Clients can use JobService.GetNasJob or other methods to check +// whether the cancellation succeeded or whether the job completed despite +// cancellation. On successful cancellation, the NasJob is not deleted; instead +// it becomes a job with a NasJob.error value with a google.rpc.Status.code of +// 1, corresponding to `Code.CANCELLED`, and NasJob.state is set to +// `CANCELLED`. // -// - name: The name of the ModelEvaluation resource. Format: -// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua -// tion}`. -func (r *ProjectsLocationsModelsEvaluationsService) Get(name string) *ProjectsLocationsModelsEvaluationsGetCall { - c := &ProjectsLocationsModelsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NasJob to cancel. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. +func (r *ProjectsLocationsNasJobsService) Cancel(name string, googlecloudaiplatformv1cancelnasjobrequest *GoogleCloudAiplatformV1CancelNasJobRequest) *ProjectsLocationsNasJobsCancelCall { + c := &ProjectsLocationsNasJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1cancelnasjobrequest = googlecloudaiplatformv1cancelnasjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsGetCall { +func (c *ProjectsLocationsNasJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsGetCall { +func (c *ProjectsLocationsNasJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsNasJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsNasJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelnasjobrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -79073,13 +81993,13 @@ func (c *ProjectsLocationsModelsEvaluationsGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.get" call. +// Do executes the "aiplatform.projects.locations.nasJobs.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelEvaluation.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 *ProjectsLocationsModelsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluation, error) { +// *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 *ProjectsLocationsNasJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79098,7 +82018,7 @@ func (c *ProjectsLocationsModelsEvaluationsGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelEvaluation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79111,59 +82031,59 @@ func (c *ProjectsLocationsModelsEvaluationsGetCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsModelsEvaluationsImportCall struct { - s *Service - parent string - googlecloudaiplatformv1importmodelevaluationrequest *GoogleCloudAiplatformV1ImportModelEvaluationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1nasjob *GoogleCloudAiplatformV1NasJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports an externally generated ModelEvaluation. +// Create: Creates a NasJob // -// - parent: The name of the parent model resource. Format: -// `projects/{project}/locations/{location}/models/{model}`. -func (r *ProjectsLocationsModelsEvaluationsService) Import(parent string, googlecloudaiplatformv1importmodelevaluationrequest *GoogleCloudAiplatformV1ImportModelEvaluationRequest) *ProjectsLocationsModelsEvaluationsImportCall { - c := &ProjectsLocationsModelsEvaluationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to create the NasJob in. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNasJobsService) Create(parent string, googlecloudaiplatformv1nasjob *GoogleCloudAiplatformV1NasJob) *ProjectsLocationsNasJobsCreateCall { + c := &ProjectsLocationsNasJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1importmodelevaluationrequest = googlecloudaiplatformv1importmodelevaluationrequest + c.googlecloudaiplatformv1nasjob = googlecloudaiplatformv1nasjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsImportCall { +func (c *ProjectsLocationsNasJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsImportCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsImportCall { +func (c *ProjectsLocationsNasJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNasJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsImportCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importmodelevaluationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1nasjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79176,13 +82096,13 @@ func (c *ProjectsLocationsModelsEvaluationsImportCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.import" call. +// Do executes the "aiplatform.projects.locations.nasJobs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelEvaluation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1NasJob.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 *ProjectsLocationsModelsEvaluationsImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluation, error) { +func (c *ProjectsLocationsNasJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79201,7 +82121,7 @@ func (c *ProjectsLocationsModelsEvaluationsImportCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelEvaluation{ + ret := &GoogleCloudAiplatformV1NasJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79214,112 +82134,72 @@ func (c *ProjectsLocationsModelsEvaluationsImportCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsModelsEvaluationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists ModelEvaluations in a Model. +// Delete: Deletes a NasJob. // -// - parent: The resource name of the Model to list the ModelEvaluations from. -// Format: `projects/{project}/locations/{location}/models/{model}`. -func (r *ProjectsLocationsModelsEvaluationsService) List(parent string) *ProjectsLocationsModelsEvaluationsListCall { - c := &ProjectsLocationsModelsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsModelsEvaluationsListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsModelsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListModelEvaluationsResponse.next_page_token -// of the previous ModelService.ListModelEvaluations call. -func (c *ProjectsLocationsModelsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsModelsEvaluationsListCall) ReadMask(readMask string) *ProjectsLocationsModelsEvaluationsListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the NasJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. +func (r *ProjectsLocationsNasJobsService) Delete(name string) *ProjectsLocationsNasJobsDeleteCall { + c := &ProjectsLocationsNasJobsDeleteCall{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 // details. -func (c *ProjectsLocationsModelsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsListCall { +func (c *ProjectsLocationsNasJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsListCall { +func (c *ProjectsLocationsNasJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNasJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsListCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/evaluations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } 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.models.evaluations.list" call. +// Do executes the "aiplatform.projects.locations.nasJobs.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelEvaluationsResponse.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 +// *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 *ProjectsLocationsModelsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelEvaluationsResponse, error) { +func (c *ProjectsLocationsNasJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79338,7 +82218,7 @@ func (c *ProjectsLocationsModelsEvaluationsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelEvaluationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79351,48 +82231,21 @@ func (c *ProjectsLocationsModelsEvaluationsListCall) Do(opts ...googleapi.CallOp return ret, nil } -// 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 *ProjectsLocationsModelsEvaluationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelEvaluationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsModelsEvaluationsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + 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`. +// Get: Gets a NasJob // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) Cancel(name string) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { - c := &ProjectsLocationsModelsEvaluationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NasJob resource. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. +func (r *ProjectsLocationsNasJobsService) Get(name string) *ProjectsLocationsNasJobsGetCall { + c := &ProjectsLocationsNasJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -79400,34 +82253,45 @@ func (r *ProjectsLocationsModelsEvaluationsOperationsService) Cancel(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { +func (c *ProjectsLocationsNasJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsNasJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { +func (c *ProjectsLocationsNasJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNasJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -79438,13 +82302,13 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.nasJobs.get" call. // 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 *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1NasJob.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 *ProjectsLocationsNasJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79463,7 +82327,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1NasJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79476,74 +82340,122 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsModelsEvaluationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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`. +// List: Lists NasJobs in a Location. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) Delete(name string) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { - c := &ProjectsLocationsModelsEvaluationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to list the NasJobs from. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNasJobsService) List(parent string) *ProjectsLocationsNasJobsListCall { + c := &ProjectsLocationsNasJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsNasJobsListCall) Filter(filter string) *ProjectsLocationsNasJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsNasJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNasJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListNasJobsResponse.next_page_token of the +// previous JobService.ListNasJobs call. +func (c *ProjectsLocationsNasJobsListCall) PageToken(pageToken string) *ProjectsLocationsNasJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsNasJobsListCall) ReadMask(readMask string) *ProjectsLocationsNasJobsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { +func (c *ProjectsLocationsNasJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsNasJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { +func (c *ProjectsLocationsNasJobsListCall) Context(ctx context.Context) *ProjectsLocationsNasJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.operations.delete" call. +// Do executes the "aiplatform.projects.locations.nasJobs.list" call. // 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 *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListNasJobsResponse.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 *ProjectsLocationsNasJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNasJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79562,7 +82474,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListNasJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79575,7 +82487,28 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsModelsEvaluationsOperationsGetCall struct { +// 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 *ProjectsLocationsNasJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNasJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsNasJobsNasTrialDetailsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -79584,13 +82517,13 @@ type ProjectsLocationsModelsEvaluationsOperationsGetCall struct { 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. +// Get: Gets a NasTrialDetail. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) Get(name string) *ProjectsLocationsModelsEvaluationsOperationsGetCall { - c := &ProjectsLocationsModelsEvaluationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NasTrialDetail resource. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/ +// {nas_trial_detail}`. +func (r *ProjectsLocationsNasJobsNasTrialDetailsService) Get(name string) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { + c := &ProjectsLocationsNasJobsNasTrialDetailsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -79598,7 +82531,7 @@ func (r *ProjectsLocationsModelsEvaluationsOperationsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79606,27 +82539,27 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Fields(s ...google // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Context(ctx context.Context) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -79647,13 +82580,13 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.operations.get" call. +// Do executes the "aiplatform.projects.locations.nasJobs.nasTrialDetails.get" call. // 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 +// *GoogleCloudAiplatformV1NasTrialDetail.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 *ProjectsLocationsModelsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasTrialDetail, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79672,7 +82605,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1NasTrialDetail{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79685,41 +82618,36 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsModelsEvaluationsOperationsListCall struct { +type ProjectsLocationsNasJobsNasTrialDetailsListCall struct { s *Service - name string + parent 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`. +// List: List top NasTrialDetails of a NasJob. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) List(name string) *ProjectsLocationsModelsEvaluationsOperationsListCall { - c := &ProjectsLocationsModelsEvaluationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The name of the NasJob resource. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. +func (r *ProjectsLocationsNasJobsNasTrialDetailsService) List(parent string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { + c := &ProjectsLocationsNasJobsNasTrialDetailsListCall{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 *ProjectsLocationsModelsEvaluationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsOperationsListCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) PageSize(pageSize int64) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsOperationsListCall { +// token. Typically obtained via ListNasTrialDetailsResponse.next_page_token of +// the previous JobService.ListNasTrialDetails call. +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) PageToken(pageToken string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -79727,7 +82655,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) PageToken(pageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsListCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79735,27 +82663,27 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Fields(s ...googl // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsOperationsListCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsListCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Context(ctx context.Context) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -79763,7 +82691,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) doRequest(alt str var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasTrialDetails") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -79771,18 +82699,18 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) doRequest(alt str } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.operations.list" call. +// Do executes the "aiplatform.projects.locations.nasJobs.nasTrialDetails.list" call. // 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 +// *GoogleCloudAiplatformV1ListNasTrialDetailsResponse.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 *ProjectsLocationsModelsEvaluationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNasTrialDetailsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79801,7 +82729,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListNasTrialDetailsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79817,7 +82745,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Do(opts ...google // 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 *ProjectsLocationsModelsEvaluationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNasTrialDetailsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -79835,69 +82763,66 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Pages(ctx context } } -type ProjectsLocationsModelsEvaluationsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookExecutionJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob + 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. +// Create: Creates a NotebookExecutionJob. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) Wait(name string) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { - c := &ProjectsLocationsModelsEvaluationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the +// NotebookExecutionJob. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookExecutionJobsService) Create(parent string, googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob) *ProjectsLocationsNotebookExecutionJobsCreateCall { + c := &ProjectsLocationsNotebookExecutionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1notebookexecutionjob = googlecloudaiplatformv1notebookexecutionjob 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 *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// NotebookExecutionJobId sets the optional parameter "notebookExecutionJobId": +// User specified ID for the NotebookExecutionJob. +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) NotebookExecutionJobId(notebookExecutionJobId string) *ProjectsLocationsNotebookExecutionJobsCreateCall { + c.urlParams_.Set("notebookExecutionJobId", notebookExecutionJobId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookexecutionjob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookExecutionJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79905,18 +82830,18 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) doRequest(alt str } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.operations.wait" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.create" call. // 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 *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79948,79 +82873,71 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Do(opts ...google return ret, nil } -type ProjectsLocationsModelsEvaluationsSlicesBatchImportCall struct { - s *Service - parent string - googlecloudaiplatformv1batchimportevaluatedannotationsrequest *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookExecutionJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchImport: Imports a list of externally generated EvaluatedAnnotations. +// Delete: Deletes a NotebookExecutionJob. // -// - parent: The name of the parent ModelEvaluationSlice resource. Format: -// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua -// tion}/slices/{slice}`. -func (r *ProjectsLocationsModelsEvaluationsSlicesService) BatchImport(parent string, googlecloudaiplatformv1batchimportevaluatedannotationsrequest *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { - c := &ProjectsLocationsModelsEvaluationsSlicesBatchImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchimportevaluatedannotationsrequest = googlecloudaiplatformv1batchimportevaluatedannotationsrequest +// - name: The name of the NotebookExecutionJob resource to be deleted. +func (r *ProjectsLocationsNotebookExecutionJobsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsDeleteCall { + c := &ProjectsLocationsNotebookExecutionJobsDeleteCall{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 // details. -func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchimportevaluatedannotationsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:batchImport") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } 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.models.evaluations.slices.batchImport" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse.ServerRespons -// e.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 *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse, error) { +// *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 *ProjectsLocationsNotebookExecutionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80039,7 +82956,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80052,7 +82969,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsModelsEvaluationsSlicesGetCall struct { +type ProjectsLocationsNotebookExecutionJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80061,21 +82978,38 @@ type ProjectsLocationsModelsEvaluationsSlicesGetCall struct { header_ http.Header } -// Get: Gets a ModelEvaluationSlice. +// Get: Gets a NotebookExecutionJob. // -// - name: The name of the ModelEvaluationSlice resource. Format: -// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua -// tion}/slices/{slice}`. -func (r *ProjectsLocationsModelsEvaluationsSlicesService) Get(name string) *ProjectsLocationsModelsEvaluationsSlicesGetCall { - c := &ProjectsLocationsModelsEvaluationsSlicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NotebookExecutionJob resource. +func (r *ProjectsLocationsNotebookExecutionJobsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsGetCall { + c := &ProjectsLocationsNotebookExecutionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// View sets the optional parameter "view": The NotebookExecutionJob view. +// Defaults to BASIC. +// +// Possible values: +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API +// +// defaults to the BASIC view. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for +// +// direct notebook inputs. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) View(view string) *ProjectsLocationsNotebookExecutionJobsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80083,27 +83017,27 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsSlicesGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -80124,13 +83058,13 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.slices.get" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelEvaluationSlice.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1NotebookExecutionJob.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 *ProjectsLocationsModelsEvaluationsSlicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluationSlice, error) { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookExecutionJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80149,7 +83083,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelEvaluationSlice{ + ret := &GoogleCloudAiplatformV1NotebookExecutionJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80162,7 +83096,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsModelsEvaluationsSlicesListCall struct { +type ProjectsLocationsNotebookExecutionJobsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -80171,52 +83105,77 @@ type ProjectsLocationsModelsEvaluationsSlicesListCall struct { header_ http.Header } -// List: Lists ModelEvaluationSlices in a ModelEvaluation. +// List: Lists NotebookExecutionJobs in a Location. // -// - parent: The resource name of the ModelEvaluation to list the -// ModelEvaluationSlices from. Format: -// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua -// tion}`. -func (r *ProjectsLocationsModelsEvaluationsSlicesService) List(parent string) *ProjectsLocationsModelsEvaluationsSlicesListCall { - c := &ProjectsLocationsModelsEvaluationsSlicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location from which to list the +// NotebookExecutionJobs. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookExecutionJobsService) List(parent string) *ProjectsLocationsNotebookExecutionJobsListCall { + c := &ProjectsLocationsNotebookExecutionJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. * -// `slice.dimension` - for =. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsSlicesListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `notebookExecutionJob` supports = and !=. +// `notebookExecutionJob` represents the NotebookExecutionJob ID. * +// `displayName` supports = and != and regex. * `schedule` supports = and != +// and regex. Some examples: * `notebookExecutionJob="123" * +// `notebookExecutionJob="my-execution-job" * `displayName="myDisplayName" +// and `displayName=~"myDisplayNameRegex" +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsListCall { c.urlParams_.Set("filter", filter) return c } +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookExecutionJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsSlicesListCall { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. Typically obtained via -// ListModelEvaluationSlicesResponse.next_page_token of the previous -// ModelService.ListModelEvaluationSlices call. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsSlicesListCall { +// ListNotebookExecutionJobsResponse.next_page_token of the previous +// NotebookService.ListNotebookExecutionJobs call. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) ReadMask(readMask string) *ProjectsLocationsModelsEvaluationsSlicesListCall { - c.urlParams_.Set("readMask", readMask) +// View sets the optional parameter "view": The NotebookExecutionJob view. +// Defaults to BASIC. +// +// Possible values: +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API +// +// defaults to the BASIC view. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for +// +// direct notebook inputs. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) View(view string) *ProjectsLocationsNotebookExecutionJobsListCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesListCall { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80224,27 +83183,27 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsSlicesListCall { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesListCall { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -80252,7 +83211,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/slices") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookExecutionJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -80265,13 +83224,13 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.slices.list" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse.ServerResponse.Head +// *GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse.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 *ProjectsLocationsModelsEvaluationsSlicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse, error) { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80290,7 +83249,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse{ + ret := &GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80306,7 +83265,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsModelsEvaluationsSlicesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse) error) error { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -80324,7 +83283,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Pages(ctx context.Con } } -type ProjectsLocationsModelsOperationsCancelCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80343,8 +83302,8 @@ type ProjectsLocationsModelsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsModelsOperationsService) Cancel(name string) *ProjectsLocationsModelsOperationsCancelCall { - c := &ProjectsLocationsModelsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Cancel(name string) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -80352,27 +83311,27 @@ func (r *ProjectsLocationsModelsOperationsService) Cancel(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsCancelCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsCancelCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -80390,13 +83349,13 @@ func (c *ProjectsLocationsModelsOperationsCancelCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.cancel" call. // 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 *ProjectsLocationsModelsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80428,7 +83387,7 @@ func (c *ProjectsLocationsModelsOperationsCancelCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsModelsOperationsDeleteCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80442,8 +83401,8 @@ type ProjectsLocationsModelsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsModelsOperationsService) Delete(name string) *ProjectsLocationsModelsOperationsDeleteCall { - c := &ProjectsLocationsModelsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -80451,27 +83410,27 @@ func (r *ProjectsLocationsModelsOperationsService) Delete(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsDeleteCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsDeleteCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -80489,13 +83448,13 @@ func (c *ProjectsLocationsModelsOperationsDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.delete" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.delete" call. // 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 *ProjectsLocationsModelsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80527,7 +83486,7 @@ func (c *ProjectsLocationsModelsOperationsDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsModelsOperationsGetCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80541,8 +83500,8 @@ type ProjectsLocationsModelsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsModelsOperationsService) Get(name string) *ProjectsLocationsModelsOperationsGetCall { - c := &ProjectsLocationsModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -80550,7 +83509,7 @@ func (r *ProjectsLocationsModelsOperationsService) Get(name string) *ProjectsLoc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80558,27 +83517,27 @@ func (c *ProjectsLocationsModelsOperationsGetCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsOperationsGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -80599,13 +83558,13 @@ func (c *ProjectsLocationsModelsOperationsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.get" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.get" call. // 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 *ProjectsLocationsModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80637,7 +83596,7 @@ func (c *ProjectsLocationsModelsOperationsGetCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsModelsOperationsListCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80650,28 +83609,28 @@ type ProjectsLocationsModelsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsModelsOperationsService) List(name string) *ProjectsLocationsModelsOperationsListCall { - c := &ProjectsLocationsModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) List(name string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsModelsOperationsListCall) Filter(filter string) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -80679,7 +83638,7 @@ func (c *ProjectsLocationsModelsOperationsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80687,27 +83646,27 @@ func (c *ProjectsLocationsModelsOperationsListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an 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. -func (c *ProjectsLocationsModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -80728,13 +83687,13 @@ func (c *ProjectsLocationsModelsOperationsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.list" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.list" call. // 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 *ProjectsLocationsModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80769,7 +83728,7 @@ func (c *ProjectsLocationsModelsOperationsListCall) Do(opts ...googleapi.CallOpt // 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 *ProjectsLocationsModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -80787,7 +83746,7 @@ func (c *ProjectsLocationsModelsOperationsListCall) Pages(ctx context.Context, f } } -type ProjectsLocationsModelsOperationsWaitCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80806,8 +83765,8 @@ type ProjectsLocationsModelsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsModelsOperationsService) Wait(name string) *ProjectsLocationsModelsOperationsWaitCall { - c := &ProjectsLocationsModelsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Wait(name string) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -80816,7 +83775,7 @@ func (r *ProjectsLocationsModelsOperationsService) Wait(name string) *ProjectsLo // 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 *ProjectsLocationsModelsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -80824,27 +83783,27 @@ func (c *ProjectsLocationsModelsOperationsWaitCall) Timeout(timeout string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -80862,13 +83821,13 @@ func (c *ProjectsLocationsModelsOperationsWaitCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.wait" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.wait" call. // 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 *ProjectsLocationsModelsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80900,285 +83859,86 @@ func (c *ProjectsLocationsModelsOperationsWaitCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsNasJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelnasjobrequest *GoogleCloudAiplatformV1CancelNasJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels a NasJob. Starts asynchronous cancellation on the NasJob. -// The server makes a best effort to cancel the job, but success is not -// guaranteed. Clients can use JobService.GetNasJob or other methods to check -// whether the cancellation succeeded or whether the job completed despite -// cancellation. On successful cancellation, the NasJob is not deleted; instead -// it becomes a job with a NasJob.error value with a google.rpc.Status.code of -// 1, corresponding to `Code.CANCELLED`, and NasJob.state is set to -// `CANCELLED`. -// -// - name: The name of the NasJob to cancel. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. -func (r *ProjectsLocationsNasJobsService) Cancel(name string, googlecloudaiplatformv1cancelnasjobrequest *GoogleCloudAiplatformV1CancelNasJobRequest) *ProjectsLocationsNasJobsCancelCall { - c := &ProjectsLocationsNasJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1cancelnasjobrequest = googlecloudaiplatformv1cancelnasjobrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNasJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsNasJobsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNasJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNasJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelnasjobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.nasJobs.cancel" call. -// 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 *ProjectsLocationsNasJobsCancelCall) 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 -} - -type ProjectsLocationsNasJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1nasjob *GoogleCloudAiplatformV1NasJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a NasJob -// -// - parent: The resource name of the Location to create the NasJob in. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNasJobsService) Create(parent string, googlecloudaiplatformv1nasjob *GoogleCloudAiplatformV1NasJob) *ProjectsLocationsNasJobsCreateCall { - c := &ProjectsLocationsNasJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1nasjob = googlecloudaiplatformv1nasjob - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNasJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNasJobsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNasJobsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNasJobsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1nasjob) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasJobs") - 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.nasJobs.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NasJob.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 *ProjectsLocationsNasJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasJob, 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 := &GoogleCloudAiplatformV1NasJob{ - 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 -} - -type ProjectsLocationsNasJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimeTemplatesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a NasJob. +// Create: Creates a NotebookRuntimeTemplate. // -// - name: The name of the NasJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. -func (r *ProjectsLocationsNasJobsService) Delete(name string) *ProjectsLocationsNasJobsDeleteCall { - c := &ProjectsLocationsNasJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the +// NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Create(parent string, googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1notebookruntimetemplate = googlecloudaiplatformv1notebookruntimetemplate + return c +} + +// NotebookRuntimeTemplateId sets the optional parameter +// "notebookRuntimeTemplateId": User specified ID for the notebook runtime +// template. +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) NotebookRuntimeTemplateId(notebookRuntimeTemplateId string) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { + c.urlParams_.Set("notebookRuntimeTemplateId", notebookRuntimeTemplateId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNasJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNasJobsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookruntimetemplate) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimeTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.nasJobs.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.create" call. // 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 *ProjectsLocationsNasJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81210,21 +83970,22 @@ func (c *ProjectsLocationsNasJobsDeleteCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsNasJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimeTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a NasJob +// Delete: Deletes a NotebookRuntimeTemplate. // -// - name: The name of the NasJob resource. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. -func (r *ProjectsLocationsNasJobsService) Get(name string) *ProjectsLocationsNasJobsGetCall { - c := &ProjectsLocationsNasJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NotebookRuntimeTemplate resource to be deleted. +// Format: +// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook +// _runtime_template}`. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Delete(name string) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -81232,45 +83993,34 @@ func (r *ProjectsLocationsNasJobsService) Get(name string) *ProjectsLocationsNas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNasJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNasJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNasJobsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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 } @@ -81281,13 +84031,13 @@ func (c *ProjectsLocationsNasJobsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.nasJobs.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NasJob.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsNasJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasJob, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81306,7 +84056,7 @@ func (c *ProjectsLocationsNasJobsGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NasJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81319,67 +84069,30 @@ func (c *ProjectsLocationsNasJobsGetCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -type ProjectsLocationsNasJobsListCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists NasJobs in a Location. +// Get: Gets a NotebookRuntimeTemplate. // -// - parent: The resource name of the Location to list the NasJobs from. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNasJobsService) List(parent string) *ProjectsLocationsNasJobsListCall { - c := &ProjectsLocationsNasJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsNasJobsListCall) Filter(filter string) *ProjectsLocationsNasJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsNasJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNasJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListNasJobsResponse.next_page_token of the -// previous JobService.ListNasJobs call. -func (c *ProjectsLocationsNasJobsListCall) PageToken(pageToken string) *ProjectsLocationsNasJobsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsNasJobsListCall) ReadMask(readMask string) *ProjectsLocationsNasJobsListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the NotebookRuntimeTemplate resource. Format: +// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook +// _runtime_template}`. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Get(name string) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesGetCall{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 // details. -func (c *ProjectsLocationsNasJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81387,27 +84100,27 @@ func (c *ProjectsLocationsNasJobsListCall) Fields(s ...googleapi.Field) *Project // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNasJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsListCall) Context(ctx context.Context) *ProjectsLocationsNasJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -81415,7 +84128,7 @@ func (c *ProjectsLocationsNasJobsListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -81423,18 +84136,18 @@ func (c *ProjectsLocationsNasJobsListCall) doRequest(alt string) (*http.Response } 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.nasJobs.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNasJobsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1NotebookRuntimeTemplate.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 *ProjectsLocationsNasJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNasJobsResponse, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntimeTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81453,7 +84166,7 @@ func (c *ProjectsLocationsNasJobsListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListNasJobsResponse{ + ret := &GoogleCloudAiplatformV1NotebookRuntimeTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81466,106 +84179,91 @@ func (c *ProjectsLocationsNasJobsListCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -// 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 *ProjectsLocationsNasJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNasJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } +type ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsNasJobsNasTrialDetailsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) GetIamPolicy(resource string) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c } -// Get: Gets a NasTrialDetail. -// -// - name: The name of the NasTrialDetail resource. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/ -// {nas_trial_detail}`. -func (r *ProjectsLocationsNasJobsNasTrialDetailsService) Get(name string) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { - c := &ProjectsLocationsNasJobsNasTrialDetailsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Context(ctx context.Context) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.nasJobs.nasTrialDetails.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NasTrialDetail.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 *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasTrialDetail, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81584,7 +84282,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NasTrialDetail{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81597,7 +84295,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsNasJobsNasTrialDetailsListCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -81606,35 +84304,73 @@ type ProjectsLocationsNasJobsNasTrialDetailsListCall struct { header_ http.Header } -// List: List top NasTrialDetails of a NasJob. +// List: Lists NotebookRuntimeTemplates in a Location. // -// - parent: The name of the NasJob resource. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. -func (r *ProjectsLocationsNasJobsNasTrialDetailsService) List(parent string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { - c := &ProjectsLocationsNasJobsNasTrialDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location from which to list the +// NotebookRuntimeTemplates. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) List(parent string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `notebookRuntimeTemplate` supports = and !=. +// `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. +// the last segment of the NotebookRuntimeTemplate's resource name. * +// `display_name` supports = and != * `labels` supports general map functions +// that is: * `labels.key=value` - key:value equality * `labels.key:* or +// labels:key - key existence * A key including a space must be quoted. +// `labels."a key". * `notebookRuntimeType` supports = and !=. +// notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` +// supports = and !=. * `acceleratorType` supports = and !=. Some examples: * +// `notebookRuntimeTemplate=notebookRuntimeTemplate123` * +// `displayName="myDisplayName" * `labels.myKey="myValue" * +// `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * +// `acceleratorType=NVIDIA_TESLA_T4` +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) PageSize(pageSize int64) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListNasTrialDetailsResponse.next_page_token of -// the previous JobService.ListNasTrialDetails call. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) PageToken(pageToken string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +// token. Typically obtained via +// ListNotebookRuntimeTemplatesResponse.next_page_token of the previous +// NotebookService.ListNotebookRuntimeTemplates call. +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) ReadMask(readMask string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81642,27 +84378,27 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Context(ctx context.Context) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -81670,7 +84406,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasTrialDetails") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimeTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -81683,13 +84419,13 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.nasJobs.nasTrialDetails.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNasTrialDetailsResponse.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 *ProjectsLocationsNasJobsNasTrialDetailsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNasTrialDetailsResponse, error) { +// *GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse.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 *ProjectsLocationsNotebookRuntimeTemplatesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81708,7 +84444,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListNasTrialDetailsResponse{ + ret := &GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81724,7 +84460,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Do(opts ...googleapi.C // 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 *ProjectsLocationsNasJobsNasTrialDetailsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNasTrialDetailsResponse) error) error { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -81742,164 +84478,69 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Pages(ctx context.Cont } } -type ProjectsLocationsNotebookExecutionJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimeTemplatesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a NotebookExecutionJob. +// Patch: Updates a NotebookRuntimeTemplate. // -// - parent: The resource name of the Location to create the -// NotebookExecutionJob. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookExecutionJobsService) Create(parent string, googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob) *ProjectsLocationsNotebookExecutionJobsCreateCall { - c := &ProjectsLocationsNotebookExecutionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1notebookexecutionjob = googlecloudaiplatformv1notebookexecutionjob +// - name: The resource name of the NotebookRuntimeTemplate. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Patch(name string, googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1notebookruntimetemplate = googlecloudaiplatformv1notebookruntimetemplate return c } -// NotebookExecutionJobId sets the optional parameter "notebookExecutionJobId": -// User specified ID for the NotebookExecutionJob. -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) NotebookExecutionJobId(notebookExecutionJobId string) *ProjectsLocationsNotebookExecutionJobsCreateCall { - c.urlParams_.Set("notebookExecutionJobId", notebookExecutionJobId) +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Input format: `{paths: "${updated_filed}"}` +// Updatable fields: * `encryption_spec.kms_key_name` +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsCreateCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsCreateCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookexecutionjob) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookExecutionJobs") - 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.notebookExecutionJobs.create" call. -// 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 *ProjectsLocationsNotebookExecutionJobsCreateCall) 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookruntimetemplate) 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 -} - -type ProjectsLocationsNotebookExecutionJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a NotebookExecutionJob. -// -// - name: The name of the NotebookExecutionJob resource to be deleted. -func (r *ProjectsLocationsNotebookExecutionJobsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsDeleteCall { - c := &ProjectsLocationsNotebookExecutionJobsDeleteCall{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 -// details. -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -81910,13 +84551,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.patch" call. // 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 +// *GoogleCloudAiplatformV1NotebookRuntimeTemplate.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 *ProjectsLocationsNotebookExecutionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntimeTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81935,7 +84576,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1NotebookRuntimeTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81948,102 +84589,81 @@ func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsNotebookExecutionJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a NotebookExecutionJob. -// -// - name: The name of the NotebookExecutionJob resource. -func (r *ProjectsLocationsNotebookExecutionJobsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsGetCall { - c := &ProjectsLocationsNotebookExecutionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": The NotebookExecutionJob view. -// Defaults to BASIC. -// -// Possible values: -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API -// -// defaults to the BASIC view. -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for -// -// direct notebook inputs. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) View(view string) *ProjectsLocationsNotebookExecutionJobsGetCall { - c.urlParams_.Set("view", view) +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NotebookExecutionJob.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 *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookExecutionJob, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82062,7 +84682,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NotebookExecutionJob{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -82075,141 +84695,87 @@ func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsNotebookExecutionJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists NotebookExecutionJobs in a Location. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - parent: The resource name of the Location from which to list the -// NotebookExecutionJobs. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookExecutionJobsService) List(parent string) *ProjectsLocationsNotebookExecutionJobsListCall { - c := &ProjectsLocationsNotebookExecutionJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `notebookExecutionJob` supports = and !=. -// `notebookExecutionJob` represents the NotebookExecutionJob ID. * -// `displayName` supports = and != and regex. * `schedule` supports = and != -// and regex. Some examples: * `notebookExecutionJob="123" * -// `notebookExecutionJob="my-execution-job" * `displayName="myDisplayName" -// and `displayName=~"myDisplayNameRegex" -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `display_name` * `create_time` * -// `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListNotebookExecutionJobsResponse.next_page_token of the previous -// NotebookService.ListNotebookExecutionJobs call. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) TestIamPermissions(resource string) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// View sets the optional parameter "view": The NotebookExecutionJob view. -// Defaults to BASIC. -// -// Possible values: -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API -// -// defaults to the BASIC view. -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for -// -// direct notebook inputs. -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) View(view string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("view", view) +// Permissions sets the optional parameter "permissions": The set of +// permissions to check for the `resource`. Permissions with wildcards (such as +// `*` or `storage.*`) are not allowed. For more information see IAM Overview +// (https://cloud.google.com/iam/docs/overview#permissions). +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/notebookExecutionJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse.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 *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse, error) { +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82228,7 +84794,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -82241,28 +84807,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.Ca return ret, nil } -// 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 *ProjectsLocationsNotebookExecutionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsNotebookExecutionJobsOperationsCancelCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82281,8 +84826,8 @@ type ProjectsLocationsNotebookExecutionJobsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Cancel(name string) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Cancel(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -82290,27 +84835,27 @@ func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Cancel(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -82328,13 +84873,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.cancel" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82366,7 +84911,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Do(opts ... return ret, nil } -type ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82380,8 +84925,8 @@ type ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Delete(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -82389,27 +84934,27 @@ func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Delete(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -82427,13 +84972,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.delete" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82465,7 +85010,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsNotebookExecutionJobsOperationsGetCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82479,8 +85024,8 @@ type ProjectsLocationsNotebookExecutionJobsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Get(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -82488,7 +85033,7 @@ func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82496,27 +85041,27 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Fields(s ...go // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -82537,13 +85082,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.get" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82575,7 +85120,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsNotebookExecutionJobsOperationsListCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82588,28 +85133,28 @@ type ProjectsLocationsNotebookExecutionJobsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) List(name string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) List(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -82617,7 +85162,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82625,27 +85170,27 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Fields(s ...g // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -82666,13 +85211,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.list" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82707,7 +85252,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Do(opts ...go // 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 *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -82725,7 +85270,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Pages(ctx con } } -type ProjectsLocationsNotebookExecutionJobsOperationsWaitCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82744,8 +85289,8 @@ type ProjectsLocationsNotebookExecutionJobsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Wait(name string) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Wait(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -82754,7 +85299,7 @@ func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Wait(name stri // 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 *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -82762,27 +85307,27 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Timeout(timeo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -82800,13 +85345,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.wait" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82838,67 +85383,61 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Do(opts ...go return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesAssignCall struct { + s *Service + parent string + googlecloudaiplatformv1assignnotebookruntimerequest *GoogleCloudAiplatformV1AssignNotebookRuntimeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a NotebookRuntimeTemplate. +// Assign: Assigns a NotebookRuntime to a user for a particular Notebook file. +// This method will either returns an existing assignment or generates a new +// one. // -// - parent: The resource name of the Location to create the -// NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Create(parent string, googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to get the NotebookRuntime +// assignment. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookRuntimesService) Assign(parent string, googlecloudaiplatformv1assignnotebookruntimerequest *GoogleCloudAiplatformV1AssignNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesAssignCall { + c := &ProjectsLocationsNotebookRuntimesAssignCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1notebookruntimetemplate = googlecloudaiplatformv1notebookruntimetemplate - return c -} - -// NotebookRuntimeTemplateId sets the optional parameter -// "notebookRuntimeTemplateId": User specified ID for the notebook runtime -// template. -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) NotebookRuntimeTemplateId(notebookRuntimeTemplateId string) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { - c.urlParams_.Set("notebookRuntimeTemplateId", notebookRuntimeTemplateId) + c.googlecloudaiplatformv1assignnotebookruntimerequest = googlecloudaiplatformv1assignnotebookruntimerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesAssignCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesAssignCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookruntimetemplate) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1assignnotebookruntimerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimeTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimes:assign") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -82911,112 +85450,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.create" call. -// 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 *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) 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 -} - -type ProjectsLocationsNotebookRuntimeTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a NotebookRuntimeTemplate. -// -// - name: The name of the NotebookRuntimeTemplate resource to be deleted. -// Format: -// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook -// _runtime_template}`. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Delete(name string) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesDeleteCall{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 -// details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.notebookRuntimeTemplates.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.assign" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83048,22 +85488,22 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a NotebookRuntimeTemplate. +// Delete: Deletes a NotebookRuntime. // -// - name: The name of the NotebookRuntimeTemplate resource. Format: -// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook -// _runtime_template}`. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Get(name string) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NotebookRuntime resource to be deleted. Instead of +// checking whether the name is in valid NotebookRuntime resource name +// format, directly throw NotFound exception if there is no such +// NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Delete(name string) *ProjectsLocationsNotebookRuntimesDeleteCall { + c := &ProjectsLocationsNotebookRuntimesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -83071,45 +85511,34 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+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 } @@ -83120,13 +85549,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NotebookRuntimeTemplate.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntimeTemplate, error) { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83145,7 +85574,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NotebookRuntimeTemplate{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83158,91 +85587,86 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Get: Gets a NotebookRuntime. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) GetIamPolicy(resource string) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no -// conditional role bindings may specify any valid value or leave the field -// unset. The policy in the response might use the policy version that you -// specified, or it might use a lower policy version. For example, if you -// specify version 3, but the policy has no conditional role bindings, the -// response uses version 1. To learn which resources support conditions in -// their IAM policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the NotebookRuntime resource. Instead of checking +// whether the name is in valid NotebookRuntime resource name format, +// directly throw NotFound exception if there is no such NotebookRuntime in +// spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Get(name string) *ProjectsLocationsNotebookRuntimesGetCall { + c := &ProjectsLocationsNotebookRuntimesGetCall{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 // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { +func (c *ProjectsLocationsNotebookRuntimesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsNotebookRuntimesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { +func (c *ProjectsLocationsNotebookRuntimesGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudAiplatformV1NotebookRuntime.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 *ProjectsLocationsNotebookRuntimesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntime, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83261,7 +85685,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudAiplatformV1NotebookRuntime{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83274,7 +85698,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesListCall struct { +type ProjectsLocationsNotebookRuntimesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -83283,31 +85707,42 @@ type ProjectsLocationsNotebookRuntimeTemplatesListCall struct { header_ http.Header } -// List: Lists NotebookRuntimeTemplates in a Location. +// List: Lists NotebookRuntimes in a Location. // // - parent: The resource name of the Location from which to list the -// NotebookRuntimeTemplates. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) List(parent string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// NotebookRuntimes. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookRuntimesService) List(parent string) *ProjectsLocationsNotebookRuntimesListCall { + c := &ProjectsLocationsNotebookRuntimesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": An expression for filtering the // results of the request. For field names both snake_case and camelCase are -// supported. * `notebookRuntimeTemplate` supports = and !=. +// supported. * `notebookRuntime` supports = and !=. `notebookRuntime` +// represents the NotebookRuntime ID, i.e. the last segment of the +// NotebookRuntime's resource name. * `displayName` supports = and != and +// regex. * `notebookRuntimeTemplate` supports = and !=. // `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. // the last segment of the NotebookRuntimeTemplate's resource name. * -// `display_name` supports = and != * `labels` supports general map functions -// that is: * `labels.key=value` - key:value equality * `labels.key:* or -// labels:key - key existence * A key including a space must be quoted. -// `labels."a key". * `notebookRuntimeType` supports = and !=. -// notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * -// `notebookRuntimeTemplate=notebookRuntimeTemplate123` * -// `displayName="myDisplayName" * `labels.myKey="myValue" * -// `notebookRuntimeType=USER_DEFINED` -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +// `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, +// HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState +// enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, +// STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. +// * API version is UI only: `uiState` supports = and !=. uiState enum: +// [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, +// UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, +// UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and +// !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` +// supports = and !=. * `acceleratorType` supports = and !=. Some examples: * +// `notebookRuntime="notebookRuntime123" * `displayName="myDisplayName" and +// `displayName=~"myDisplayNameRegex" * +// `notebookRuntimeTemplate="notebookRuntimeTemplate321" * +// `healthState=HEALTHY` * `runtimeState=RUNNING` * +// `runtimeUser="test@google.com" * `uiState=UI_RESOURCE_STATE_BEING_DELETED` +// * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * +// `acceleratorType=NVIDIA_TESLA_T4` +func (c *ProjectsLocationsNotebookRuntimesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("filter", filter) return c } @@ -83316,30 +85751,29 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Filter(filter string // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `display_name` * `create_time` * // `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListNotebookRuntimeTemplatesResponse.next_page_token of the previous -// NotebookService.ListNotebookRuntimeTemplates call. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +// token. Typically obtained via ListNotebookRuntimesResponse.next_page_token +// of the previous NotebookService.ListNotebookRuntimes call. +func (c *ProjectsLocationsNotebookRuntimesListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadMask sets the optional parameter "readMask": Mask specifying which // fields to read. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) ReadMask(readMask string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) ReadMask(readMask string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -83347,7 +85781,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) ReadMask(readMask st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83355,27 +85789,27 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Fields(s ...googleap // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -83383,7 +85817,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimeTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -83396,13 +85830,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse.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 *ProjectsLocationsNotebookRuntimeTemplatesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse, error) { +// *GoogleCloudAiplatformV1ListNotebookRuntimesResponse.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 *ProjectsLocationsNotebookRuntimesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookRuntimesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83421,7 +85855,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse{ + ret := &GoogleCloudAiplatformV1ListNotebookRuntimesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83437,7 +85871,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Do(opts ...googleapi // 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 *ProjectsLocationsNotebookRuntimeTemplatesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse) error) error { +func (c *ProjectsLocationsNotebookRuntimesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookRuntimesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -83455,69 +85889,63 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Pages(ctx context.Co } } -type ProjectsLocationsNotebookRuntimeTemplatesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesStartCall struct { + s *Service + name string + googlecloudaiplatformv1startnotebookruntimerequest *GoogleCloudAiplatformV1StartNotebookRuntimeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a NotebookRuntimeTemplate. +// Start: Starts a NotebookRuntime. // -// - name: The resource name of the NotebookRuntimeTemplate. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Patch(name string, googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NotebookRuntime resource to be started. Instead of +// checking whether the name is in valid NotebookRuntime resource name +// format, directly throw NotFound exception if there is no such +// NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Start(name string, googlecloudaiplatformv1startnotebookruntimerequest *GoogleCloudAiplatformV1StartNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesStartCall { + c := &ProjectsLocationsNotebookRuntimesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1notebookruntimetemplate = googlecloudaiplatformv1notebookruntimetemplate - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Input format: `{paths: "${updated_filed}"}` -// Updatable fields: * `encryption_spec.kms_key_name` -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googlecloudaiplatformv1startnotebookruntimerequest = googlecloudaiplatformv1startnotebookruntimerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { +func (c *ProjectsLocationsNotebookRuntimesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesStartCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { +func (c *ProjectsLocationsNotebookRuntimesStartCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesStartCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesStartCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookruntimetemplate) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1startnotebookruntimerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -83528,13 +85956,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.patch" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.start" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NotebookRuntimeTemplate.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntimeTemplate, error) { +func (c *ProjectsLocationsNotebookRuntimesStartCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83553,7 +85981,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NotebookRuntimeTemplate{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83566,62 +85994,61 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesStopCall struct { + s *Service + name string + googlecloudaiplatformv1stopnotebookruntimerequest *GoogleCloudAiplatformV1StopNotebookRuntimeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +// Stop: Stops a NotebookRuntime. // -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the NotebookRuntime resource to be stopped. Instead of +// checking whether the name is in valid NotebookRuntime resource name +// format, directly throw NotFound exception if there is no such +// NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Stop(name string, googlecloudaiplatformv1stopnotebookruntimerequest *GoogleCloudAiplatformV1StopNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesStopCall { + c := &ProjectsLocationsNotebookRuntimesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1stopnotebookruntimerequest = googlecloudaiplatformv1stopnotebookruntimerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { +func (c *ProjectsLocationsNotebookRuntimesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesStopCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { +func (c *ProjectsLocationsNotebookRuntimesStopCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesStopCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesStopCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1stopnotebookruntimerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -83629,18 +86056,18 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) doRequest(al } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.stop" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsNotebookRuntimesStopCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83659,7 +86086,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83672,68 +86099,61 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesUpgradeCall struct { + s *Service + name string + googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// Upgrade: Upgrades a NotebookRuntime. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) TestIamPermissions(resource string) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Permissions sets the optional parameter "permissions": The set of -// permissions to check for the `resource`. Permissions with wildcards (such as -// `*` or `storage.*`) are not allowed. For more information see IAM Overview -// (https://cloud.google.com/iam/docs/overview#permissions). -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// - name: The name of the NotebookRuntime resource to be upgrade. Instead of +// checking whether the name is in valid NotebookRuntime resource name +// format, directly throw NotFound exception if there is no such +// NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Upgrade(name string, googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesUpgradeCall { + c := &ProjectsLocationsNotebookRuntimesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1upgradenotebookruntimerequest = googlecloudaiplatformv1upgradenotebookruntimerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesUpgradeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesUpgradeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1upgradenotebookruntimerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:upgrade") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -83741,18 +86161,18 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.upgrade" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83771,7 +86191,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83784,7 +86204,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Do(opt return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall struct { +type ProjectsLocationsNotebookRuntimesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -83803,8 +86223,8 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Cancel(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) Cancel(name string) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { + c := &ProjectsLocationsNotebookRuntimesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -83812,27 +86232,27 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Cancel(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -83850,13 +86270,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.cancel" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83888,7 +86308,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Do(opts return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall struct { +type ProjectsLocationsNotebookRuntimesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -83902,8 +86322,8 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Delete(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) Delete(name string) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { + c := &ProjectsLocationsNotebookRuntimesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -83911,27 +86331,27 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -83949,13 +86369,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.delete" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83987,7 +86407,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Do(opts return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall struct { +type ProjectsLocationsNotebookRuntimesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84001,8 +86421,8 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Get(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) Get(name string) *ProjectsLocationsNotebookRuntimesOperationsGetCall { + c := &ProjectsLocationsNotebookRuntimesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -84010,7 +86430,7 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84018,27 +86438,27 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Fields(s .. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -84059,13 +86479,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.get" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84097,7 +86517,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall struct { +type ProjectsLocationsNotebookRuntimesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84110,28 +86530,28 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) List(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) List(name string) *ProjectsLocationsNotebookRuntimesOperationsListCall { + c := &ProjectsLocationsNotebookRuntimesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -84139,7 +86559,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageToken( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84147,27 +86567,27 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Fields(s . // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -84188,13 +86608,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.list" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84229,7 +86649,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Do(opts .. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -84247,7 +86667,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Pages(ctx } } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall struct { +type ProjectsLocationsNotebookRuntimesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84266,8 +86686,8 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Wait(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) Wait(name string) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { + c := &ProjectsLocationsNotebookRuntimesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -84276,7 +86696,7 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Wait(name s // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -84284,27 +86704,27 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Timeout(ti // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -84322,13 +86742,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.wait" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.wait" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84360,61 +86780,60 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Do(opts .. return ret, nil } -type ProjectsLocationsNotebookRuntimesAssignCall struct { - s *Service - parent string - googlecloudaiplatformv1assignnotebookruntimerequest *GoogleCloudAiplatformV1AssignNotebookRuntimeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Assign: Assigns a NotebookRuntime to a user for a particular Notebook file. -// This method will either returns an existing assignment or generates a new -// one. +// 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 get the NotebookRuntime -// assignment. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookRuntimesService) Assign(parent string, googlecloudaiplatformv1assignnotebookruntimerequest *GoogleCloudAiplatformV1AssignNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesAssignCall { - c := &ProjectsLocationsNotebookRuntimesAssignCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1assignnotebookruntimerequest = googlecloudaiplatformv1assignnotebookruntimerequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{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 // details. -func (c *ProjectsLocationsNotebookRuntimesAssignCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesAssignCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesAssignCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesAssignCall { +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesAssignCall) Header() http.Header { +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesAssignCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1assignnotebookruntimerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimes:assign") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -84422,18 +86841,18 @@ func (c *ProjectsLocationsNotebookRuntimesAssignCall) doRequest(alt string) (*ht } 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.notebookRuntimes.assign" call. +// Do executes the "aiplatform.projects.locations.operations.cancel" call. // 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 *ProjectsLocationsNotebookRuntimesAssignCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84452,7 +86871,7 @@ func (c *ProjectsLocationsNotebookRuntimesAssignCall) Do(opts ...googleapi.CallO 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, @@ -84465,7 +86884,7 @@ func (c *ProjectsLocationsNotebookRuntimesAssignCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsNotebookRuntimesDeleteCall struct { +type ProjectsLocationsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84473,14 +86892,14 @@ type ProjectsLocationsNotebookRuntimesDeleteCall struct { header_ http.Header } -// Delete: Deletes a NotebookRuntime. +// 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 NotebookRuntime resource to be deleted. Instead of -// checking whether the name is in valid NotebookRuntime resource name -// format, directly throw NotFound exception if there is no such -// NotebookRuntime in spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Delete(name string) *ProjectsLocationsNotebookRuntimesDeleteCall { - c := &ProjectsLocationsNotebookRuntimesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -84488,27 +86907,27 @@ func (r *ProjectsLocationsNotebookRuntimesService) Delete(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesDeleteCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesDeleteCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -84526,13 +86945,13 @@ func (c *ProjectsLocationsNotebookRuntimesDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.delete" call. +// Do executes the "aiplatform.projects.locations.operations.delete" call. // 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 *ProjectsLocationsNotebookRuntimesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84551,7 +86970,7 @@ func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Do(opts ...googleapi.CallO 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, @@ -84564,7 +86983,7 @@ func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsNotebookRuntimesGetCall struct { +type ProjectsLocationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84573,14 +86992,13 @@ type ProjectsLocationsNotebookRuntimesGetCall struct { header_ http.Header } -// Get: Gets a NotebookRuntime. +// 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 NotebookRuntime resource. Instead of checking -// whether the name is in valid NotebookRuntime resource name format, -// directly throw NotFound exception if there is no such NotebookRuntime in -// spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Get(name string) *ProjectsLocationsNotebookRuntimesGetCall { - c := &ProjectsLocationsNotebookRuntimesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -84588,7 +87006,7 @@ func (r *ProjectsLocationsNotebookRuntimesService) Get(name string) *ProjectsLoc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesGetCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84596,27 +87014,27 @@ func (c *ProjectsLocationsNotebookRuntimesGetCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookRuntimesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesGetCall { +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesGetCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesGetCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -84637,13 +87055,13 @@ func (c *ProjectsLocationsNotebookRuntimesGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.get" call. +// Do executes the "aiplatform.projects.locations.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NotebookRuntime.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNotebookRuntimesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntime, error) { +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84662,7 +87080,7 @@ func (c *ProjectsLocationsNotebookRuntimesGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NotebookRuntime{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -84675,357 +87093,87 @@ func (c *ProjectsLocationsNotebookRuntimesGetCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsNotebookRuntimesListCall struct { +type ProjectsLocationsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists NotebookRuntimes in a Location. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Location from which to list the -// NotebookRuntimes. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookRuntimesService) List(parent string) *ProjectsLocationsNotebookRuntimesListCall { - c := &ProjectsLocationsNotebookRuntimesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `notebookRuntime` supports = and !=. `notebookRuntime` -// represents the NotebookRuntime ID, i.e. the last segment of the -// NotebookRuntime's resource name. * `displayName` supports = and != and -// regex. * `notebookRuntimeTemplate` supports = and !=. -// `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. -// the last segment of the NotebookRuntimeTemplate's resource name. * -// `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, -// HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState -// enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, -// STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. -// * API version is UI only: `uiState` supports = and !=. uiState enum: -// [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, -// UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, -// UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and -// !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * -// `notebookRuntime="notebookRuntime123" * `displayName="myDisplayName" and -// `displayName=~"myDisplayNameRegex" * -// `notebookRuntimeTemplate="notebookRuntimeTemplate321" * -// `healthState=HEALTHY` * `runtimeState=RUNNING` * -// `runtimeUser="test@google.com" * `uiState=UI_RESOURCE_STATE_BEING_DELETED` -// * `notebookRuntimeType=USER_DEFINED` -func (c *ProjectsLocationsNotebookRuntimesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `display_name` * `create_time` * -// `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsNotebookRuntimesListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookRuntimesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNotebookRuntimesListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimesListCall { +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListNotebookRuntimesResponse.next_page_token -// of the previous NotebookService.ListNotebookRuntimes call. -func (c *ProjectsLocationsNotebookRuntimesListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsNotebookRuntimesListCall) ReadMask(readMask string) *ProjectsLocationsNotebookRuntimesListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNotebookRuntimesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookRuntimesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNotebookRuntimesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNotebookRuntimesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/notebookRuntimes") - 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.notebookRuntimes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNotebookRuntimesResponse.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 *ProjectsLocationsNotebookRuntimesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookRuntimesResponse, 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 := &GoogleCloudAiplatformV1ListNotebookRuntimesResponse{ - 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 -} - -// 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 *ProjectsLocationsNotebookRuntimesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookRuntimesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsNotebookRuntimesStartCall struct { - s *Service - name string - googlecloudaiplatformv1startnotebookruntimerequest *GoogleCloudAiplatformV1StartNotebookRuntimeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Start: Starts a NotebookRuntime. -// -// - name: The name of the NotebookRuntime resource to be started. Instead of -// checking whether the name is in valid NotebookRuntime resource name -// format, directly throw NotFound exception if there is no such -// NotebookRuntime in spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Start(name string, googlecloudaiplatformv1startnotebookruntimerequest *GoogleCloudAiplatformV1StartNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesStartCall { - c := &ProjectsLocationsNotebookRuntimesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1startnotebookruntimerequest = googlecloudaiplatformv1startnotebookruntimerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNotebookRuntimesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesStartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesStartCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesStartCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNotebookRuntimesStartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNotebookRuntimesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1startnotebookruntimerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start") - 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.notebookRuntimes.start" call. -// 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 *ProjectsLocationsNotebookRuntimesStartCall) 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 -} - -type ProjectsLocationsNotebookRuntimesStopCall struct { - s *Service - name string - googlecloudaiplatformv1stopnotebookruntimerequest *GoogleCloudAiplatformV1StopNotebookRuntimeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Stop: Stops a NotebookRuntime. -// -// - name: The name of the NotebookRuntime resource to be stopped. Instead of -// checking whether the name is in valid NotebookRuntime resource name -// format, directly throw NotFound exception if there is no such -// NotebookRuntime in spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Stop(name string, googlecloudaiplatformv1stopnotebookruntimerequest *GoogleCloudAiplatformV1StopNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesStopCall { - c := &ProjectsLocationsNotebookRuntimesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1stopnotebookruntimerequest = googlecloudaiplatformv1stopnotebookruntimerequest +// token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 // details. -func (c *ProjectsLocationsNotebookRuntimesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesStopCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesStopCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesStopCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesStopCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1stopnotebookruntimerequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:stop") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -85036,13 +87184,13 @@ func (c *ProjectsLocationsNotebookRuntimesStopCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.stop" call. +// Do executes the "aiplatform.projects.locations.operations.list" call. // 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 +// *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 *ProjectsLocationsNotebookRuntimesStopCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85061,7 +87209,7 @@ func (c *ProjectsLocationsNotebookRuntimesStopCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85074,61 +87222,90 @@ func (c *ProjectsLocationsNotebookRuntimesStopCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsNotebookRuntimesUpgradeCall struct { - s *Service - name string - googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Upgrade: Upgrades a NotebookRuntime. +type ProjectsLocationsOperationsWaitCall 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 NotebookRuntime resource to be upgrade. Instead of -// checking whether the name is in valid NotebookRuntime resource name -// format, directly throw NotFound exception if there is no such -// NotebookRuntime in spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Upgrade(name string, googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesUpgradeCall { - c := &ProjectsLocationsNotebookRuntimesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsOperationsService) Wait(name string) *ProjectsLocationsOperationsWaitCall { + c := &ProjectsLocationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1upgradenotebookruntimerequest = googlecloudaiplatformv1upgradenotebookruntimerequest + 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 *ProjectsLocationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesUpgradeCall { +func (c *ProjectsLocationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesUpgradeCall { +func (c *ProjectsLocationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Header() http.Header { +func (c *ProjectsLocationsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1upgradenotebookruntimerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:upgrade") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85141,13 +87318,13 @@ func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.upgrade" call. +// Do executes the "aiplatform.projects.locations.operations.wait" call. // 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85179,60 +87356,69 @@ func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsNotebookRuntimesOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPersistentResourcesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource + urlParams_ gensupport.URLParams + ctx_ context.Context + 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`. +// Create: Creates a PersistentResource. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) Cancel(name string) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { - c := &ProjectsLocationsNotebookRuntimesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the PersistentResource +// in. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPersistentResourcesService) Create(parent string, googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource) *ProjectsLocationsPersistentResourcesCreateCall { + c := &ProjectsLocationsPersistentResourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1persistentresource = googlecloudaiplatformv1persistentresource + return c +} + +// PersistentResourceId sets the optional parameter "persistentResourceId": +// Required. The ID to use for the PersistentResource, which become the final +// component of the PersistentResource's resource name. The maximum length is +// 63 characters, and valid characters are `/^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$/`. +func (c *ProjectsLocationsPersistentResourcesCreateCall) PersistentResourceId(persistentResourceId string) *ProjectsLocationsPersistentResourcesCreateCall { + c.urlParams_.Set("persistentResourceId", persistentResourceId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { +func (c *ProjectsLocationsPersistentResourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { +func (c *ProjectsLocationsPersistentResourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPersistentResourcesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1persistentresource) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/persistentResources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85240,18 +87426,18 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.persistentResources.create" call. // 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 *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsPersistentResourcesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85270,7 +87456,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Do(opts ...googl 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, @@ -85283,7 +87469,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsNotebookRuntimesOperationsDeleteCall struct { +type ProjectsLocationsPersistentResourcesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85291,14 +87477,13 @@ type ProjectsLocationsNotebookRuntimesOperationsDeleteCall struct { 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`. +// Delete: Deletes a PersistentResource. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) Delete(name string) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { - c := &ProjectsLocationsNotebookRuntimesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the PersistentResource to be deleted. Format: +// `projects/{project}/locations/{location}/persistentResources/{persistent_re +// source}`. +func (r *ProjectsLocationsPersistentResourcesService) Delete(name string) *ProjectsLocationsPersistentResourcesDeleteCall { + c := &ProjectsLocationsPersistentResourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85306,27 +87491,27 @@ func (r *ProjectsLocationsNotebookRuntimesOperationsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { +func (c *ProjectsLocationsPersistentResourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { +func (c *ProjectsLocationsPersistentResourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -85344,13 +87529,13 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.delete" call. +// Do executes the "aiplatform.projects.locations.persistentResources.delete" call. // 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 *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsPersistentResourcesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85369,7 +87554,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Do(opts ...googl 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, @@ -85382,7 +87567,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsNotebookRuntimesOperationsGetCall struct { +type ProjectsLocationsPersistentResourcesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85391,13 +87576,13 @@ type ProjectsLocationsNotebookRuntimesOperationsGetCall struct { 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. +// Get: Gets a PersistentResource. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) Get(name string) *ProjectsLocationsNotebookRuntimesOperationsGetCall { - c := &ProjectsLocationsNotebookRuntimesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the PersistentResource resource. Format: +// `projects/{project_id_or_number}/locations/{location_id}/persistentResource +// s/{persistent_resource_id}`. +func (r *ProjectsLocationsPersistentResourcesService) Get(name string) *ProjectsLocationsPersistentResourcesGetCall { + c := &ProjectsLocationsPersistentResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85405,7 +87590,7 @@ func (r *ProjectsLocationsNotebookRuntimesOperationsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85413,27 +87598,27 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Fields(s ...googlea // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -85454,13 +87639,13 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.get" call. +// Do executes the "aiplatform.projects.locations.persistentResources.get" call. // 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 +// *GoogleCloudAiplatformV1PersistentResource.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 *ProjectsLocationsNotebookRuntimesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPersistentResourcesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PersistentResource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85479,7 +87664,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1PersistentResource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85492,41 +87677,37 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsNotebookRuntimesOperationsListCall struct { +type ProjectsLocationsPersistentResourcesListCall struct { s *Service - name string + parent 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`. +// List: Lists PersistentResources in a Location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) List(name string) *ProjectsLocationsNotebookRuntimesOperationsListCall { - c := &ProjectsLocationsNotebookRuntimesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The resource name of the Location to list the PersistentResources +// from. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPersistentResourcesService) List(parent string) *ProjectsLocationsPersistentResourcesListCall { + c := &ProjectsLocationsPersistentResourcesListCall{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 *ProjectsLocationsNotebookRuntimesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimesOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsPersistentResourcesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimesOperationsListCall { +// token. Typically obtained via +// ListPersistentResourcesResponse.next_page_token of the previous +// PersistentResourceService.ListPersistentResource call. +func (c *ProjectsLocationsPersistentResourcesListCall) PageToken(pageToken string) *ProjectsLocationsPersistentResourcesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -85534,7 +87715,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85542,27 +87723,27 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Fields(s ...google // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesListCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -85570,7 +87751,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/persistentResources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -85578,18 +87759,20 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.list" call. +// Do executes the "aiplatform.projects.locations.persistentResources.list" call. // 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 +// *GoogleCloudAiplatformV1ListPersistentResourcesResponse.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 *ProjectsLocationsNotebookRuntimesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsPersistentResourcesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListPersistentResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85608,7 +87791,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListPersistentResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85624,7 +87807,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Do(opts ...googlea // 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 *ProjectsLocationsNotebookRuntimesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsPersistentResourcesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListPersistentResourcesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -85642,69 +87825,169 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Pages(ctx context. } } -type ProjectsLocationsNotebookRuntimesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPersistentResourcesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource + 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. +// Patch: Updates a PersistentResource. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) Wait(name string) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { - c := &ProjectsLocationsNotebookRuntimesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Resource name of a PersistentResource. +func (r *ProjectsLocationsPersistentResourcesService) Patch(name string, googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource) *ProjectsLocationsPersistentResourcesPatchCall { + c := &ProjectsLocationsPersistentResourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1persistentresource = googlecloudaiplatformv1persistentresource 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 *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// UpdateMask sets the optional parameter "updateMask": Required. Specify the +// fields to be overwritten in the PersistentResource by the update method. +func (c *ProjectsLocationsPersistentResourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPersistentResourcesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPersistentResourcesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1persistentresource) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.persistentResources.patch" call. +// 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 *ProjectsLocationsPersistentResourcesPatchCall) 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 +} + +type ProjectsLocationsPersistentResourcesRebootCall struct { + s *Service + name string + googlecloudaiplatformv1rebootpersistentresourcerequest *GoogleCloudAiplatformV1RebootPersistentResourceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Reboot: Reboots a PersistentResource. +// +// - name: The name of the PersistentResource resource. Format: +// `projects/{project_id_or_number}/locations/{location_id}/persistentResource +// s/{persistent_resource_id}`. +func (r *ProjectsLocationsPersistentResourcesService) Reboot(name string, googlecloudaiplatformv1rebootpersistentresourcerequest *GoogleCloudAiplatformV1RebootPersistentResourceRequest) *ProjectsLocationsPersistentResourcesRebootCall { + c := &ProjectsLocationsPersistentResourcesRebootCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1rebootpersistentresourcerequest = googlecloudaiplatformv1rebootpersistentresourcerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsPersistentResourcesRebootCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesRebootCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPersistentResourcesRebootCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesRebootCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsPersistentResourcesRebootCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPersistentResourcesRebootCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rebootpersistentresourcerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reboot") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85717,13 +88000,13 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.wait" call. +// Do executes the "aiplatform.projects.locations.persistentResources.reboot" call. // 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 *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPersistentResourcesRebootCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85755,7 +88038,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsOperationsCancelCall struct { +type ProjectsLocationsPersistentResourcesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85774,8 +88057,8 @@ type ProjectsLocationsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) Cancel(name string) *ProjectsLocationsPersistentResourcesOperationsCancelCall { + c := &ProjectsLocationsPersistentResourcesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85783,27 +88066,27 @@ func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -85821,13 +88104,13 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.cancel" call. // 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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85859,7 +88142,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsDeleteCall struct { +type ProjectsLocationsPersistentResourcesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85873,8 +88156,8 @@ type ProjectsLocationsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) Delete(name string) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { + c := &ProjectsLocationsPersistentResourcesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85882,27 +88165,27 @@ func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -85920,13 +88203,13 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.delete" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.delete" call. // 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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85958,7 +88241,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsPersistentResourcesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85972,8 +88255,8 @@ type ProjectsLocationsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) Get(name string) *ProjectsLocationsPersistentResourcesOperationsGetCall { + c := &ProjectsLocationsPersistentResourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85981,7 +88264,7 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85989,27 +88272,27 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // IfNoneMatch sets an 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. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -86030,13 +88313,13 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.get" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.get" call. // 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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86068,7 +88351,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsPersistentResourcesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -86081,28 +88364,28 @@ type ProjectsLocationsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) List(name string) *ProjectsLocationsPersistentResourcesOperationsListCall { + c := &ProjectsLocationsPersistentResourcesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Filter(filter string) *ProjectsLocationsPersistentResourcesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsPersistentResourcesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsPersistentResourcesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -86110,7 +88393,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -86118,27 +88401,27 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an 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. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -86159,13 +88442,13 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.list" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.list" call. // 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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86200,7 +88483,7 @@ func (c *ProjectsLocationsOperationsListCall) 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -86218,7 +88501,7 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsOperationsWaitCall struct { +type ProjectsLocationsPersistentResourcesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -86237,8 +88520,8 @@ type ProjectsLocationsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsOperationsService) Wait(name string) *ProjectsLocationsOperationsWaitCall { - c := &ProjectsLocationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) Wait(name string) *ProjectsLocationsPersistentResourcesOperationsWaitCall { + c := &ProjectsLocationsPersistentResourcesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -86247,7 +88530,7 @@ func (r *ProjectsLocationsOperationsService) Wait(name string) *ProjectsLocation // 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 *ProjectsLocationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsPersistentResourcesOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -86255,27 +88538,27 @@ func (c *ProjectsLocationsOperationsWaitCall) Timeout(timeout string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -86293,13 +88576,13 @@ func (c *ProjectsLocationsOperationsWaitCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.wait" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.wait" call. // 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 *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86331,69 +88614,64 @@ func (c *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsPersistentResourcesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsBatchCancelCall struct { + s *Service + parent string + googlecloudaiplatformv1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1BatchCancelPipelineJobsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a PersistentResource. +// BatchCancel: Batch cancel PipelineJobs. Firstly the server will check if all +// the jobs are in non-terminal states, and skip the jobs that are already +// terminated. If the operation failed, none of the pipeline jobs are +// cancelled. The server will poll the states of all the pipeline jobs +// periodically to check the cancellation status. This operation will return an +// LRO. // -// - parent: The resource name of the Location to create the PersistentResource -// in. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPersistentResourcesService) Create(parent string, googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource) *ProjectsLocationsPersistentResourcesCreateCall { - c := &ProjectsLocationsPersistentResourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the PipelineJobs' parent resource. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) BatchCancel(parent string, googlecloudaiplatformv1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1BatchCancelPipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchCancelCall { + c := &ProjectsLocationsPipelineJobsBatchCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1persistentresource = googlecloudaiplatformv1persistentresource - return c -} - -// PersistentResourceId sets the optional parameter "persistentResourceId": -// Required. The ID to use for the PersistentResource, which become the final -// component of the PersistentResource's resource name. The maximum length is -// 63 characters, and valid characters are `/^a-z -// ([a-z0-9-]{0,61}[a-z0-9])?$/`. -func (c *ProjectsLocationsPersistentResourcesCreateCall) PersistentResourceId(persistentResourceId string) *ProjectsLocationsPersistentResourcesCreateCall { - c.urlParams_.Set("persistentResourceId", persistentResourceId) + c.googlecloudaiplatformv1batchcancelpipelinejobsrequest = googlecloudaiplatformv1batchcancelpipelinejobsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesCreateCall { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesCreateCall { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesCreateCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1persistentresource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcancelpipelinejobsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/persistentResources") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs:batchCancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -86406,13 +88684,13 @@ func (c *ProjectsLocationsPersistentResourcesCreateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.create" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.batchCancel" call. // 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 *ProjectsLocationsPersistentResourcesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86444,73 +88722,80 @@ func (c *ProjectsLocationsPersistentResourcesCreateCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsPersistentResourcesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsBatchDeleteCall struct { + s *Service + parent string + googlecloudaiplatformv1batchdeletepipelinejobsrequest *GoogleCloudAiplatformV1BatchDeletePipelineJobsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a PersistentResource. +// BatchDelete: Batch deletes PipelineJobs The Operation is atomic. If it +// fails, none of the PipelineJobs are deleted. If it succeeds, all of the +// PipelineJobs are deleted. // -// - name: The name of the PersistentResource to be deleted. Format: -// `projects/{project}/locations/{location}/persistentResources/{persistent_re -// source}`. -func (r *ProjectsLocationsPersistentResourcesService) Delete(name string) *ProjectsLocationsPersistentResourcesDeleteCall { - c := &ProjectsLocationsPersistentResourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The name of the PipelineJobs' parent resource. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) BatchDelete(parent string, googlecloudaiplatformv1batchdeletepipelinejobsrequest *GoogleCloudAiplatformV1BatchDeletePipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchDeleteCall { + c := &ProjectsLocationsPipelineJobsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchdeletepipelinejobsrequest = googlecloudaiplatformv1batchdeletepipelinejobsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesDeleteCall { +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesDeleteCall { +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchdeletepipelinejobsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs:batchDelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.delete" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.batchDelete" call. // 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 *ProjectsLocationsPersistentResourcesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86542,68 +88827,68 @@ func (c *ProjectsLocationsPersistentResourcesDeleteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsPersistentResourcesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelpipelinejobrequest *GoogleCloudAiplatformV1CancelPipelineJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a PersistentResource. +// Cancel: Cancels a PipelineJob. Starts asynchronous cancellation on the +// PipelineJob. The server makes a best effort to cancel the pipeline, but +// success is not guaranteed. Clients can use PipelineService.GetPipelineJob or +// other methods to check whether the cancellation succeeded or whether the +// pipeline completed despite cancellation. On successful cancellation, the +// PipelineJob is not deleted; instead it becomes a pipeline with a +// PipelineJob.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`, and PipelineJob.state is set to `CANCELLED`. // -// - name: The name of the PersistentResource resource. Format: -// `projects/{project_id_or_number}/locations/{location_id}/persistentResource -// s/{persistent_resource_id}`. -func (r *ProjectsLocationsPersistentResourcesService) Get(name string) *ProjectsLocationsPersistentResourcesGetCall { - c := &ProjectsLocationsPersistentResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the PipelineJob to cancel. Format: +// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. +func (r *ProjectsLocationsPipelineJobsService) Cancel(name string, googlecloudaiplatformv1cancelpipelinejobrequest *GoogleCloudAiplatformV1CancelPipelineJobRequest) *ProjectsLocationsPipelineJobsCancelCall { + c := &ProjectsLocationsPipelineJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1cancelpipelinejobrequest = googlecloudaiplatformv1cancelpipelinejobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesGetCall { +func (c *ProjectsLocationsPipelineJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsPersistentResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesGetCall { +func (c *ProjectsLocationsPipelineJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesGetCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPipelineJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelpipelinejobrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -86614,13 +88899,13 @@ func (c *ProjectsLocationsPersistentResourcesGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.get" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PersistentResource.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 *ProjectsLocationsPersistentResourcesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PersistentResource, error) { +// *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 *ProjectsLocationsPipelineJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86639,7 +88924,7 @@ func (c *ProjectsLocationsPersistentResourcesGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PersistentResource{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86652,83 +88937,71 @@ func (c *ProjectsLocationsPersistentResourcesGetCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsPersistentResourcesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1pipelinejob *GoogleCloudAiplatformV1PipelineJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists PersistentResources in a Location. +// Create: Creates a PipelineJob. A PipelineJob will run immediately when +// created. // -// - parent: The resource name of the Location to list the PersistentResources -// from. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPersistentResourcesService) List(parent string) *ProjectsLocationsPersistentResourcesListCall { - c := &ProjectsLocationsPersistentResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to create the PipelineJob in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) Create(parent string, googlecloudaiplatformv1pipelinejob *GoogleCloudAiplatformV1PipelineJob) *ProjectsLocationsPipelineJobsCreateCall { + c := &ProjectsLocationsPipelineJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googlecloudaiplatformv1pipelinejob = googlecloudaiplatformv1pipelinejob return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsPersistentResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsPersistentResourcesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListPersistentResourcesResponse.next_page_token of the previous -// PersistentResourceService.ListPersistentResource call. -func (c *ProjectsLocationsPersistentResourcesListCall) PageToken(pageToken string) *ProjectsLocationsPersistentResourcesListCall { - c.urlParams_.Set("pageToken", pageToken) +// PipelineJobId sets the optional parameter "pipelineJobId": The ID to use for +// the PipelineJob, which will become the final component of the PipelineJob +// name. If not provided, an ID will be automatically generated. This value +// should be less than 128 characters, and valid characters are `/a-z-/`. +func (c *ProjectsLocationsPipelineJobsCreateCall) PipelineJobId(pipelineJobId string) *ProjectsLocationsPipelineJobsCreateCall { + c.urlParams_.Set("pipelineJobId", pipelineJobId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesListCall { +func (c *ProjectsLocationsPipelineJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsPersistentResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesListCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesListCall { +func (c *ProjectsLocationsPipelineJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesListCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPipelineJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1pipelinejob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/persistentResources") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -86739,15 +89012,13 @@ func (c *ProjectsLocationsPersistentResourcesListCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.list" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListPersistentResourcesResponse.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 +// *GoogleCloudAiplatformV1PipelineJob.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 *ProjectsLocationsPersistentResourcesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListPersistentResourcesResponse, error) { +func (c *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PipelineJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86766,7 +89037,7 @@ func (c *ProjectsLocationsPersistentResourcesListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListPersistentResourcesResponse{ + ret := &GoogleCloudAiplatformV1PipelineJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86779,88 +89050,164 @@ func (c *ProjectsLocationsPersistentResourcesListCall) Do(opts ...googleapi.Call return ret, nil } -// 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 *ProjectsLocationsPersistentResourcesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListPersistentResourcesResponse) error) error { +type ProjectsLocationsPipelineJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a PipelineJob. +// +// - name: The name of the PipelineJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. +func (r *ProjectsLocationsPipelineJobsService) Delete(name string) *ProjectsLocationsPipelineJobsDeleteCall { + c := &ProjectsLocationsPipelineJobsDeleteCall{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 +// details. +func (c *ProjectsLocationsPipelineJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPipelineJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsDeleteCall { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsPipelineJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPipelineJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.pipelineJobs.delete" call. +// 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 *ProjectsLocationsPipelineJobsDeleteCall) 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() } - c.PageToken(x.NextPageToken) + 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 } -type ProjectsLocationsPersistentResourcesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a PersistentResource. +// Get: Gets a PipelineJob. // -// - name: Immutable. Resource name of a PersistentResource. -func (r *ProjectsLocationsPersistentResourcesService) Patch(name string, googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource) *ProjectsLocationsPersistentResourcesPatchCall { - c := &ProjectsLocationsPersistentResourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the PipelineJob resource. Format: +// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. +func (r *ProjectsLocationsPipelineJobsService) Get(name string) *ProjectsLocationsPipelineJobsGetCall { + c := &ProjectsLocationsPipelineJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1persistentresource = googlecloudaiplatformv1persistentresource - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Specify the -// fields to be overwritten in the PersistentResource by the update method. -func (c *ProjectsLocationsPersistentResourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPersistentResourcesPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesPatchCall { +func (c *ProjectsLocationsPipelineJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsPipelineJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesPatchCall { +func (c *ProjectsLocationsPipelineJobsGetCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesPatchCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1persistentresource) - if err != nil { - return nil, err +func (c *ProjectsLocationsPipelineJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -86871,13 +89218,13 @@ func (c *ProjectsLocationsPersistentResourcesPatchCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.patch" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.get" call. // 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 +// *GoogleCloudAiplatformV1PipelineJob.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 *ProjectsLocationsPersistentResourcesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PipelineJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86896,7 +89243,7 @@ func (c *ProjectsLocationsPersistentResourcesPatchCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1PipelineJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86909,79 +89256,147 @@ func (c *ProjectsLocationsPersistentResourcesPatchCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsPersistentResourcesRebootCall struct { - s *Service - name string - googlecloudaiplatformv1rebootpersistentresourcerequest *GoogleCloudAiplatformV1RebootPersistentResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Reboot: Reboots a PersistentResource. +// List: Lists PipelineJobs in a Location. // -// - name: The name of the PersistentResource resource. Format: -// `projects/{project_id_or_number}/locations/{location_id}/persistentResource -// s/{persistent_resource_id}`. -func (r *ProjectsLocationsPersistentResourcesService) Reboot(name string, googlecloudaiplatformv1rebootpersistentresourcerequest *GoogleCloudAiplatformV1RebootPersistentResourceRequest) *ProjectsLocationsPersistentResourcesRebootCall { - c := &ProjectsLocationsPersistentResourcesRebootCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1rebootpersistentresourcerequest = googlecloudaiplatformv1rebootpersistentresourcerequest +// - parent: The resource name of the Location to list the PipelineJobs from. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) List(parent string) *ProjectsLocationsPipelineJobsListCall { + c := &ProjectsLocationsPipelineJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the PipelineJobs that +// match the filter expression. The following fields are supported: * +// `pipeline_name`: Supports `=` and `!=` comparisons. * `display_name`: +// Supports `=`, `!=` comparisons, and `:` wildcard. * `pipeline_job_user_id`: +// Supports `=`, `!=` comparisons, and `:` wildcard. for example, can check if +// pipeline's display_name contains *step* by doing display_name:\"*step*\" * +// `state`: Supports `=` and `!=` comparisons. * `create_time`: Supports `=`, +// `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 +// format. * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` +// comparisons. Values must be in RFC 3339 format. * `end_time`: Supports `=`, +// `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 +// format. * `labels`: Supports key-value equality and key presence. * +// `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard. * +// `template_metadata.version`: Supports `=`, `!=` comparisons, and `:` +// wildcard. Filter expressions can be combined together using logical +// operators (`AND` & `OR`). For example: `pipeline_name="test" AND +// create_time>"2020-05-18T13:30:00Z". The syntax to define filter expression +// is based on https://google.aip.dev/160. Examples: * +// `create_time>"2021-05-18T00:00:00Z" OR update_time>"2020-05-18T00:00:00Z" +// PipelineJobs created or updated after 2020-05-18 00:00:00 UTC. * `labels.env +// = "prod" PipelineJobs with label "env" set to "prod". +func (c *ProjectsLocationsPipelineJobsListCall) Filter(filter string) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by. The default sort order is in ascending order. Use "desc" +// after a field name for descending. You can have multiple order_by fields +// provided e.g. "create_time desc, end_time", "end_time, start_time, +// update_time" For example, using "create_time desc, end_time" will order +// results by create time in descending order, and if there are multiple jobs +// having the same create time, order them by the end time in ascending order. +// if order_by is not specified, it will order by default order is create time +// in descending order. Supported fields: * `create_time` * `update_time` * +// `end_time` * `start_time` +func (c *ProjectsLocationsPipelineJobsListCall) OrderBy(orderBy string) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsPipelineJobsListCall) PageSize(pageSize int64) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListPipelineJobsResponse.next_page_token of +// the previous PipelineService.ListPipelineJobs call. +func (c *ProjectsLocationsPipelineJobsListCall) PageToken(pageToken string) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsPipelineJobsListCall) ReadMask(readMask string) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesRebootCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesRebootCall { +func (c *ProjectsLocationsPipelineJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsPipelineJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesRebootCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesRebootCall { +func (c *ProjectsLocationsPipelineJobsListCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesRebootCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesRebootCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rebootpersistentresourcerequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsPipelineJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:reboot") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.reboot" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.list" call. // 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 +// *GoogleCloudAiplatformV1ListPipelineJobsResponse.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 *ProjectsLocationsPersistentResourcesRebootCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListPipelineJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87000,7 +89415,7 @@ func (c *ProjectsLocationsPersistentResourcesRebootCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListPipelineJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -87013,7 +89428,28 @@ func (c *ProjectsLocationsPersistentResourcesRebootCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsPersistentResourcesOperationsCancelCall struct { +// 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 *ProjectsLocationsPipelineJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListPipelineJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsPipelineJobsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -87032,8 +89468,8 @@ type ProjectsLocationsPersistentResourcesOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsPersistentResourcesOperationsService) Cancel(name string) *ProjectsLocationsPersistentResourcesOperationsCancelCall { - c := &ProjectsLocationsPersistentResourcesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPipelineJobsOperationsService) Cancel(name string) *ProjectsLocationsPipelineJobsOperationsCancelCall { + c := &ProjectsLocationsPipelineJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -87041,27 +89477,27 @@ func (r *ProjectsLocationsPersistentResourcesOperationsService) Cancel(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsCancelCall { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsCancelCall { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -87079,13 +89515,13 @@ func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.cancel" call. // 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 *ProjectsLocationsPersistentResourcesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87117,7 +89553,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Do(opts ...go return ret, nil } -type ProjectsLocationsPersistentResourcesOperationsDeleteCall struct { +type ProjectsLocationsPipelineJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -87131,8 +89567,8 @@ type ProjectsLocationsPersistentResourcesOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsPersistentResourcesOperationsService) Delete(name string) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { - c := &ProjectsLocationsPersistentResourcesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPipelineJobsOperationsService) Delete(name string) *ProjectsLocationsPipelineJobsOperationsDeleteCall { + c := &ProjectsLocationsPipelineJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -87140,27 +89576,27 @@ func (r *ProjectsLocationsPersistentResourcesOperationsService) Delete(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -87178,13 +89614,13 @@ func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.operations.delete" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.delete" call. // 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 *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87216,7 +89652,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsPersistentResourcesOperationsGetCall struct { +type ProjectsLocationsPipelineJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -87230,8 +89666,8 @@ type ProjectsLocationsPersistentResourcesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsPersistentResourcesOperationsService) Get(name string) *ProjectsLocationsPersistentResourcesOperationsGetCall { - c := &ProjectsLocationsPersistentResourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPipelineJobsOperationsService) Get(name string) *ProjectsLocationsPipelineJobsOperationsGetCall { + c := &ProjectsLocationsPipelineJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -87239,7 +89675,7 @@ func (r *ProjectsLocationsPersistentResourcesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsGetCall { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -87247,27 +89683,27 @@ func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Fields(s ...goog // IfNoneMatch sets an 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. -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesOperationsGetCall { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsGetCall { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -87288,13 +89724,13 @@ func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.operations.get" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.get" call. // 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 *ProjectsLocationsPersistentResourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87326,7 +89762,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsPersistentResourcesOperationsListCall struct { +type ProjectsLocationsPipelineJobsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -87339,28 +89775,28 @@ type ProjectsLocationsPersistentResourcesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsPersistentResourcesOperationsService) List(name string) *ProjectsLocationsPersistentResourcesOperationsListCall { - c := &ProjectsLocationsPersistentResourcesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPipelineJobsOperationsService) List(name string) *ProjectsLocationsPipelineJobsOperationsListCall { + c := &ProjectsLocationsPipelineJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Filter(filter string) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Filter(filter string) *ProjectsLocationsPipelineJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsPipelineJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsPipelineJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -87368,7 +89804,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -87376,27 +89812,27 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Fields(s ...goo // IfNoneMatch sets an 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. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -87417,13 +89853,13 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.operations.list" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.list" call. // 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 *ProjectsLocationsPersistentResourcesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87458,7 +89894,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Do(opts ...goog // 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 *ProjectsLocationsPersistentResourcesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -87476,282 +89912,69 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Pages(ctx conte } } -type ProjectsLocationsPersistentResourcesOperationsWaitCall 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 *ProjectsLocationsPersistentResourcesOperationsService) Wait(name string) *ProjectsLocationsPersistentResourcesOperationsWaitCall { - c := &ProjectsLocationsPersistentResourcesOperationsWaitCall{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 *ProjectsLocationsPersistentResourcesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsPersistentResourcesOperationsWaitCall { - 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 -// details. -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.persistentResources.operations.wait" call. -// 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 *ProjectsLocationsPersistentResourcesOperationsWaitCall) 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 -} - -type ProjectsLocationsPipelineJobsBatchCancelCall struct { - s *Service - parent string - googlecloudaiplatformv1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1BatchCancelPipelineJobsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BatchCancel: Batch cancel PipelineJobs. Firstly the server will check if all -// the jobs are in non-terminal states, and skip the jobs that are already -// terminated. If the operation failed, none of the pipeline jobs are -// cancelled. The server will poll the states of all the pipeline jobs -// periodically to check the cancellation status. This operation will return an -// LRO. -// -// - parent: The name of the PipelineJobs' parent resource. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPipelineJobsService) BatchCancel(parent string, googlecloudaiplatformv1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1BatchCancelPipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchCancelCall { - c := &ProjectsLocationsPipelineJobsBatchCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchcancelpipelinejobsrequest = googlecloudaiplatformv1batchcancelpipelinejobsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcancelpipelinejobsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs:batchCancel") - 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.pipelineJobs.batchCancel" call. -// 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 *ProjectsLocationsPipelineJobsBatchCancelCall) 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 -} - -type ProjectsLocationsPipelineJobsBatchDeleteCall struct { - s *Service - parent string - googlecloudaiplatformv1batchdeletepipelinejobsrequest *GoogleCloudAiplatformV1BatchDeletePipelineJobsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchDelete: Batch deletes PipelineJobs The Operation is atomic. If it -// fails, none of the PipelineJobs are deleted. If it succeeds, all of the -// PipelineJobs are deleted. +// 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. // -// - parent: The name of the PipelineJobs' parent resource. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPipelineJobsService) BatchDelete(parent string, googlecloudaiplatformv1batchdeletepipelinejobsrequest *GoogleCloudAiplatformV1BatchDeletePipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchDeleteCall { - c := &ProjectsLocationsPipelineJobsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchdeletepipelinejobsrequest = googlecloudaiplatformv1batchdeletepipelinejobsrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsPipelineJobsOperationsService) Wait(name string) *ProjectsLocationsPipelineJobsOperationsWaitCall { + c := &ProjectsLocationsPipelineJobsOperationsWaitCall{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 *ProjectsLocationsPipelineJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsPipelineJobsOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchDeleteCall { +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchDeleteCall { +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchdeletepipelinejobsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs:batchDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -87759,18 +89982,18 @@ func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) doRequest(alt string) (*h } 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.pipelineJobs.batchDelete" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.wait" call. // 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 *ProjectsLocationsPipelineJobsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87802,66 +90025,59 @@ func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsPipelineJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelpipelinejobrequest *GoogleCloudAiplatformV1CancelPipelineJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a PipelineJob. Starts asynchronous cancellation on the -// PipelineJob. The server makes a best effort to cancel the pipeline, but -// success is not guaranteed. Clients can use PipelineService.GetPipelineJob or -// other methods to check whether the cancellation succeeded or whether the -// pipeline completed despite cancellation. On successful cancellation, the -// PipelineJob is not deleted; instead it becomes a pipeline with a -// PipelineJob.error value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`, and PipelineJob.state is set to `CANCELLED`. +// ComputeTokens: Return a list of tokens based on the input text. // -// - name: The name of the PipelineJob to cancel. Format: -// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. -func (r *ProjectsLocationsPipelineJobsService) Cancel(name string, googlecloudaiplatformv1cancelpipelinejobrequest *GoogleCloudAiplatformV1CancelPipelineJobRequest) *ProjectsLocationsPipelineJobsCancelCall { - c := &ProjectsLocationsPipelineJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1cancelpipelinejobrequest = googlecloudaiplatformv1cancelpipelinejobrequest +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *ProjectsLocationsPublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsPublishersModelsComputeTokensCall { + c := &ProjectsLocationsPublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsCancelCall { +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsComputeTokensCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsCancelCall { +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsComputeTokensCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelpipelinejobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -87869,18 +90085,18 @@ func (c *ProjectsLocationsPipelineJobsCancelCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.cancel" call. +// Do executes the "aiplatform.projects.locations.publishers.models.computeTokens" call. // 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 *ProjectsLocationsPipelineJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ComputeTokensResponse.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 *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87899,7 +90115,7 @@ func (c *ProjectsLocationsPipelineJobsCancelCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -87912,69 +90128,59 @@ func (c *ProjectsLocationsPipelineJobsCancelCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsPipelineJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1pipelinejob *GoogleCloudAiplatformV1PipelineJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a PipelineJob. A PipelineJob will run immediately when -// created. +// CountTokens: Perform a token counting. // -// - parent: The resource name of the Location to create the PipelineJob in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPipelineJobsService) Create(parent string, googlecloudaiplatformv1pipelinejob *GoogleCloudAiplatformV1PipelineJob) *ProjectsLocationsPipelineJobsCreateCall { - c := &ProjectsLocationsPipelineJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1pipelinejob = googlecloudaiplatformv1pipelinejob - return c -} - -// PipelineJobId sets the optional parameter "pipelineJobId": The ID to use for -// the PipelineJob, which will become the final component of the PipelineJob -// name. If not provided, an ID will be automatically generated. This value -// should be less than 128 characters, and valid characters are `/a-z-/`. -func (c *ProjectsLocationsPipelineJobsCreateCall) PipelineJobId(pipelineJobId string) *ProjectsLocationsPipelineJobsCreateCall { - c.urlParams_.Set("pipelineJobId", pipelineJobId) +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsPublishersModelsCountTokensCall { + c := &ProjectsLocationsPublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsCreateCall { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsCountTokensCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsCreateCall { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsCountTokensCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1pipelinejob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -87982,18 +90188,18 @@ func (c *ProjectsLocationsPipelineJobsCreateCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.create" call. +// Do executes the "aiplatform.projects.locations.publishers.models.countTokens" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PipelineJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1CountTokensResponse.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 *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PipelineJob, error) { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88012,7 +90218,7 @@ func (c *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PipelineJob{ + ret := &GoogleCloudAiplatformV1CountTokensResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88025,72 +90231,80 @@ func (c *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsPipelineJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsFetchPredictOperationCall struct { + s *Service + endpoint string + googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a PipelineJob. +// FetchPredictOperation: Fetch an asynchronous online prediction operation. // -// - name: The name of the PipelineJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. -func (r *ProjectsLocationsPipelineJobsService) Delete(name string) *ProjectsLocationsPipelineJobsDeleteCall { - c := &ProjectsLocationsPipelineJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or +// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod +// el}`. +func (r *ProjectsLocationsPublishersModelsService) FetchPredictOperation(endpoint string, googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { + c := &ProjectsLocationsPublishersModelsFetchPredictOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1fetchpredictoperationrequest = googlecloudaiplatformv1fetchpredictoperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsDeleteCall { +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsDeleteCall { +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchpredictoperationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:fetchPredictOperation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.delete" call. +// Do executes the "aiplatform.projects.locations.publishers.models.fetchPredictOperation" call. // 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 *ProjectsLocationsPipelineJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88122,84 +90336,81 @@ func (c *ProjectsLocationsPipelineJobsDeleteCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsPipelineJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a PipelineJob. +// GenerateContent: Generate content with multimodal inputs. // -// - name: The name of the PipelineJob resource. Format: -// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. -func (r *ProjectsLocationsPipelineJobsService) Get(name string) *ProjectsLocationsPipelineJobsGetCall { - c := &ProjectsLocationsPipelineJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { + c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsGetCall { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsGenerateContentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsPipelineJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsGetCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsGetCall { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsGenerateContentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.get" call. +// Do executes the "aiplatform.projects.locations.publishers.models.generateContent" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PipelineJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *ProjectsLocationsPipelineJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PipelineJob, error) { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88218,7 +90429,7 @@ func (c *ProjectsLocationsPipelineJobsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PipelineJob{ + ret := &GoogleCloudAiplatformV1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88231,147 +90442,78 @@ func (c *ProjectsLocationsPipelineJobsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsPipelineJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists PipelineJobs in a Location. +// Predict: Perform an online prediction. // -// - parent: The resource name of the Location to list the PipelineJobs from. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPipelineJobsService) List(parent string) *ProjectsLocationsPipelineJobsListCall { - c := &ProjectsLocationsPipelineJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the PipelineJobs that -// match the filter expression. The following fields are supported: * -// `pipeline_name`: Supports `=` and `!=` comparisons. * `display_name`: -// Supports `=`, `!=` comparisons, and `:` wildcard. * `pipeline_job_user_id`: -// Supports `=`, `!=` comparisons, and `:` wildcard. for example, can check if -// pipeline's display_name contains *step* by doing display_name:\"*step*\" * -// `state`: Supports `=` and `!=` comparisons. * `create_time`: Supports `=`, -// `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 -// format. * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` -// comparisons. Values must be in RFC 3339 format. * `end_time`: Supports `=`, -// `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 -// format. * `labels`: Supports key-value equality and key presence. * -// `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard. * -// `template_metadata.version`: Supports `=`, `!=` comparisons, and `:` -// wildcard. Filter expressions can be combined together using logical -// operators (`AND` & `OR`). For example: `pipeline_name="test" AND -// create_time>"2020-05-18T13:30:00Z". The syntax to define filter expression -// is based on https://google.aip.dev/160. Examples: * -// `create_time>"2021-05-18T00:00:00Z" OR update_time>"2020-05-18T00:00:00Z" -// PipelineJobs created or updated after 2020-05-18 00:00:00 UTC. * `labels.env -// = "prod" PipelineJobs with label "env" set to "prod". -func (c *ProjectsLocationsPipelineJobsListCall) Filter(filter string) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by. The default sort order is in ascending order. Use "desc" -// after a field name for descending. You can have multiple order_by fields -// provided e.g. "create_time desc, end_time", "end_time, start_time, -// update_time" For example, using "create_time desc, end_time" will order -// results by create time in descending order, and if there are multiple jobs -// having the same create time, order them by the end time in ascending order. -// if order_by is not specified, it will order by default order is create time -// in descending order. Supported fields: * `create_time` * `update_time` * -// `end_time` * `start_time` -func (c *ProjectsLocationsPipelineJobsListCall) OrderBy(orderBy string) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsPipelineJobsListCall) PageSize(pageSize int64) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListPipelineJobsResponse.next_page_token of -// the previous PipelineService.ListPipelineJobs call. -func (c *ProjectsLocationsPipelineJobsListCall) PageToken(pageToken string) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsPipelineJobsListCall) ReadMask(readMask string) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("readMask", readMask) +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) Predict(endpoint string, googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest) *ProjectsLocationsPublishersModelsPredictCall { + c := &ProjectsLocationsPublishersModelsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1predictrequest = googlecloudaiplatformv1predictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsListCall { +func (c *ProjectsLocationsPublishersModelsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsPipelineJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsListCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsListCall { +func (c *ProjectsLocationsPublishersModelsPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsListCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPublishersModelsPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.list" call. +// Do executes the "aiplatform.projects.locations.publishers.models.predict" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListPipelineJobsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1PredictResponse.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 *ProjectsLocationsPipelineJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListPipelineJobsResponse, error) { +func (c *ProjectsLocationsPublishersModelsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88390,7 +90532,7 @@ func (c *ProjectsLocationsPipelineJobsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListPipelineJobsResponse{ + ret := &GoogleCloudAiplatformV1PredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88403,81 +90545,61 @@ func (c *ProjectsLocationsPipelineJobsListCall) Do(opts ...googleapi.CallOption) return ret, nil } -// 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 *ProjectsLocationsPipelineJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListPipelineJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsPipelineJobsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsPredictLongRunningCall struct { + s *Service + endpoint string + googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + 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`. +// PredictLongRunning: // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsPipelineJobsOperationsService) Cancel(name string) *ProjectsLocationsPipelineJobsOperationsCancelCall { - c := &ProjectsLocationsPipelineJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or +// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod +// el}`. +func (r *ProjectsLocationsPublishersModelsService) PredictLongRunning(endpoint string, googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest) *ProjectsLocationsPublishersModelsPredictLongRunningCall { + c := &ProjectsLocationsPublishersModelsPredictLongRunningCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1predictlongrunningrequest = googlecloudaiplatformv1predictlongrunningrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsCancelCall { +func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsPredictLongRunningCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsCancelCall { +func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsPredictLongRunningCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictlongrunningrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predictLongRunning") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -88485,18 +90607,18 @@ func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.publishers.models.predictLongRunning" call. // 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 *ProjectsLocationsPipelineJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsPublishersModelsPredictLongRunningCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88515,7 +90637,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Do(opts ...googleapi 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, @@ -88528,74 +90650,82 @@ func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsPipelineJobsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest + 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`. +// RawPredict: Perform an online prediction with an arbitrary HTTP payload. The +// response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: +// ID of the Endpoint that served this prediction. * +// `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that +// served this prediction. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsPipelineJobsOperationsService) Delete(name string) *ProjectsLocationsPipelineJobsOperationsDeleteCall { - c := &ProjectsLocationsPipelineJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) RawPredict(endpoint string, googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest) *ProjectsLocationsPublishersModelsRawPredictCall { + c := &ProjectsLocationsPublishersModelsRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1rawpredictrequest = googlecloudaiplatformv1rawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsDeleteCall { +func (c *ProjectsLocationsPublishersModelsRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsDeleteCall { +func (c *ProjectsLocationsPublishersModelsRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPublishersModelsRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:rawPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.publishers.models.rawPredict" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// *GoogleApiHttpBody.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 *ProjectsLocationsPipelineJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPublishersModelsRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88614,7 +90744,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88627,85 +90757,79 @@ func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsPipelineJobsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsServerStreamingPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest + urlParams_ gensupport.URLParams + 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. +// ServerStreamingPredict: Perform a server-side streaming online prediction +// request for Vertex LLM streaming. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsPipelineJobsOperationsService) Get(name string) *ProjectsLocationsPipelineJobsOperationsGetCall { - c := &ProjectsLocationsPipelineJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) ServerStreamingPredict(endpoint string, googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { + c := &ProjectsLocationsPublishersModelsServerStreamingPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1streamingpredictrequest = googlecloudaiplatformv1streamingpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsGetCall { +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsGetCall { +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:serverStreamingPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.publishers.models.serverStreamingPredict" call. // 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 +// *GoogleCloudAiplatformV1StreamingPredictResponse.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 *ProjectsLocationsPipelineJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1StreamingPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88724,7 +90848,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1StreamingPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88737,104 +90861,82 @@ func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsPipelineJobsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + 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`. +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsPipelineJobsOperationsService) List(name string) *ProjectsLocationsPipelineJobsOperationsListCall { - c := &ProjectsLocationsPipelineJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Filter(filter string) *ProjectsLocationsPipelineJobsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsPipelineJobsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsPipelineJobsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { + c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsListCall { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsListCall { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.list" call. +// Do executes the "aiplatform.projects.locations.publishers.models.streamGenerateContent" call. // 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 +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *ProjectsLocationsPipelineJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88853,7 +90955,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88866,90 +90968,60 @@ func (c *ProjectsLocationsPipelineJobsOperationsListCall) Do(opts ...googleapi.C return ret, nil } -// 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 *ProjectsLocationsPipelineJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsPipelineJobsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsStreamRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest + 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. +// StreamRawPredict: Perform a streaming online prediction with an arbitrary +// HTTP payload. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsPipelineJobsOperationsService) Wait(name string) *ProjectsLocationsPipelineJobsOperationsWaitCall { - c := &ProjectsLocationsPipelineJobsOperationsWaitCall{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 *ProjectsLocationsPipelineJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsPipelineJobsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest) *ProjectsLocationsPublishersModelsStreamRawPredictCall { + c := &ProjectsLocationsPublishersModelsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1streamrawpredictrequest = googlecloudaiplatformv1streamrawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsWaitCall { +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsWaitCall { +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamrawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:streamRawPredict") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -88957,18 +91029,18 @@ func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.publishers.models.streamRawPredict" call. // 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 *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleApiHttpBody.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 *ProjectsLocationsPublishersModelsStreamRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88987,7 +91059,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89000,59 +91072,59 @@ func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsPublishersModelsComputeTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ComputeTokens: Return a list of tokens based on the input text. +// Create: Creates a RagCorpus. // -// - endpoint: The name of the Endpoint requested to get lists of tokens and -// token ids. -func (r *ProjectsLocationsPublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsPublishersModelsComputeTokensCall { - c := &ProjectsLocationsPublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest +// - parent: The resource name of the Location to create the RagCorpus in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsRagCorporaService) Create(parent string, googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus) *ProjectsLocationsRagCorporaCreateCall { + c := &ProjectsLocationsRagCorporaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1ragcorpus = googlecloudaiplatformv1ragcorpus return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsComputeTokensCall { +func (c *ProjectsLocationsRagCorporaCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsComputeTokensCall { +func (c *ProjectsLocationsRagCorporaCreateCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsComputeTokensCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1ragcorpus) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragCorpora") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -89060,18 +91132,18 @@ func (c *ProjectsLocationsPublishersModelsComputeTokensCall) doRequest(alt strin } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.computeTokens" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { +func (c *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89090,7 +91162,7 @@ func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89103,78 +91175,80 @@ func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsPublishersModelsCountTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CountTokens: Perform a token counting. +// Delete: Deletes a RagCorpus. // -// - endpoint: The name of the Endpoint requested to perform token counting. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsPublishersModelsCountTokensCall { - c := &ProjectsLocationsPublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest +// - 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)} + 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)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsCountTokensCall { +func (c *ProjectsLocationsRagCorporaDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsCountTokensCall { +func (c *ProjectsLocationsRagCorporaDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsCountTokensCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsCountTokensCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.countTokens" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { +func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89193,7 +91267,7 @@ func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CountTokensResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89206,80 +91280,84 @@ func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsPublishersModelsFetchPredictOperationCall struct { - s *Service - endpoint string - googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// FetchPredictOperation: Fetch an asynchronous online prediction operation. +// Get: Gets a RagCorpus. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or -// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod -// el}`. -func (r *ProjectsLocationsPublishersModelsService) FetchPredictOperation(endpoint string, googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { - c := &ProjectsLocationsPublishersModelsFetchPredictOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1fetchpredictoperationrequest = googlecloudaiplatformv1fetchpredictoperationrequest +// - 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)} + 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 // details. -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { +func (c *ProjectsLocationsRagCorporaGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +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. -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { +func (c *ProjectsLocationsRagCorporaGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchpredictoperationrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+endpoint}:fetchPredictOperation") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.fetchPredictOperation" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.get" call. // 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 +// *GoogleCloudAiplatformV1RagCorpus.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 *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RagCorpus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89298,7 +91376,7 @@ func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1RagCorpus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89311,81 +91389,99 @@ func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Do(opts ... return ret, nil } -type ProjectsLocationsPublishersModelsGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// GenerateContent: Generate content with multimodal inputs. +// List: Lists RagCorpora in a Location. // -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { - c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// - 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 + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsRagCorporaListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaListCall { + 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 { + 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 // details. -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsGenerateContentCall { +func (c *ProjectsLocationsRagCorporaListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsRagCorporaListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsGenerateContentCall { +func (c *ProjectsLocationsRagCorporaListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+model}:generateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragCorpora") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "model": c.model, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.generateContent" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// *GoogleCloudAiplatformV1ListRagCorporaResponse.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 *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListRagCorporaResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89404,7 +91500,7 @@ func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleCloudAiplatformV1ListRagCorporaResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89417,78 +91513,98 @@ func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...google return ret, nil } -type ProjectsLocationsPublishersModelsPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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(*GoogleCloudAiplatformV1ListRagCorporaResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Predict: Perform an online prediction. +type ProjectsLocationsRagCorporaPatchCall struct { + s *Service + name string + googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a RagCorpus. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) Predict(endpoint string, googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest) *ProjectsLocationsPublishersModelsPredictCall { - c := &ProjectsLocationsPublishersModelsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1predictrequest = googlecloudaiplatformv1predictrequest +// - name: Output only. The resource name of the RagCorpus. +func (r *ProjectsLocationsRagCorporaService) Patch(name string, googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus) *ProjectsLocationsRagCorporaPatchCall { + c := &ProjectsLocationsRagCorporaPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1ragcorpus = googlecloudaiplatformv1ragcorpus return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsPredictCall { +func (c *ProjectsLocationsRagCorporaPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsPredictCall { +func (c *ProjectsLocationsRagCorporaPatchCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsPredictCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsPredictCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1ragcorpus) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.predict" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PredictResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PredictResponse, error) { +func (c *ProjectsLocationsRagCorporaPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89507,7 +91623,7 @@ func (c *ProjectsLocationsPublishersModelsPredictCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PredictResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89520,61 +91636,60 @@ func (c *ProjectsLocationsPublishersModelsPredictCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsPublishersModelsPredictLongRunningCall struct { - s *Service - endpoint string - googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest - 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 } -// PredictLongRunning: +// 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`. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or -// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod -// el}`. -func (r *ProjectsLocationsPublishersModelsService) PredictLongRunning(endpoint string, googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest) *ProjectsLocationsPublishersModelsPredictLongRunningCall { - c := &ProjectsLocationsPublishersModelsPredictLongRunningCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1predictlongrunningrequest = googlecloudaiplatformv1predictlongrunningrequest +// - 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 // details. -func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsPredictLongRunningCall { +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. -func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsPredictLongRunningCall { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictlongrunningrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predictLongRunning") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -89582,18 +91697,18 @@ func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.predictLongRunning" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.cancel" call. // 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 *ProjectsLocationsPublishersModelsPredictLongRunningCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 { @@ -89612,7 +91727,7 @@ func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Do(opts ...goo 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, @@ -89625,82 +91740,74 @@ func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsPublishersModelsRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RawPredict: Perform an online prediction with an arbitrary HTTP payload. The -// response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: -// ID of the Endpoint that served this prediction. * -// `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that -// served this prediction. +// 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`. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) RawPredict(endpoint string, googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest) *ProjectsLocationsPublishersModelsRawPredictCall { - c := &ProjectsLocationsPublishersModelsRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1rawpredictrequest = googlecloudaiplatformv1rawpredictrequest +// - 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 } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsRawPredictCall { +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. -func (c *ProjectsLocationsPublishersModelsRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsRawPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsRawPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rawpredictrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:rawPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.rawPredict" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsPublishersModelsRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +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 { @@ -89719,7 +91826,7 @@ func (c *ProjectsLocationsPublishersModelsRawPredictCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89732,79 +91839,85 @@ func (c *ProjectsLocationsPublishersModelsRawPredictCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsPublishersModelsServerStreamingPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ServerStreamingPredict: Perform a server-side streaming online prediction -// request for Vertex LLM streaming. +// 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. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) ServerStreamingPredict(endpoint string, googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { - c := &ProjectsLocationsPublishersModelsServerStreamingPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1streamingpredictrequest = googlecloudaiplatformv1streamingpredictrequest +// - 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 // details. -func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +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. -func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingpredictrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+endpoint}:serverStreamingPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.serverStreamingPredict" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1StreamingPredictResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1StreamingPredictResponse, 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 { @@ -89823,7 +91936,7 @@ func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1StreamingPredictResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89836,82 +91949,104 @@ func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts .. return ret, nil } -type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StreamGenerateContent: Generate content with multimodal inputs with -// streaming support. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { - c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// - 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 // details. -func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +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. -func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+model}:streamGenerateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "model": c.model, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.streamGenerateContent" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +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 { @@ -89930,7 +92065,7 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89943,60 +92078,90 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ... return ret, nil } -type ProjectsLocationsPublishersModelsStreamRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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")) + 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) + } } -// StreamRawPredict: Perform a streaming online prediction with an arbitrary -// HTTP payload. +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. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest) *ProjectsLocationsPublishersModelsStreamRawPredictCall { - c := &ProjectsLocationsPublishersModelsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1streamrawpredictrequest = googlecloudaiplatformv1streamrawpredictrequest +// - 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 // details. -func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamRawPredictCall { +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. -func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamRawPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamrawpredictrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:streamRawPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -90004,18 +92169,18 @@ func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.streamRawPredict" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.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 *ProjectsLocationsPublishersModelsStreamRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *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 { @@ -90034,7 +92199,7 @@ func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90047,78 +92212,73 @@ func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsRagCorporaCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a RagCorpus. +// Delete: Deletes a RagFile. // -// - parent: The resource name of the Location to create the RagCorpus in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsRagCorporaService) Create(parent string, googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus) *ProjectsLocationsRagCorporaCreateCall { - c := &ProjectsLocationsRagCorporaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1ragcorpus = googlecloudaiplatformv1ragcorpus +// - name: The name of the RagFile resource to be deleted. Format: +// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{ +// 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 // details. -func (c *ProjectsLocationsRagCorporaCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaCreateCall { +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. -func (c *ProjectsLocationsRagCorporaCreateCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaCreateCall { +func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaCreateCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1ragcorpus) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragCorpora") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } 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. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.delete" call. // 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 *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -90150,63 +92310,68 @@ func (c *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsRagCorporaDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a RagCorpus. +// Get: Gets a RagFile. // -// - 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 RagFile resource. Format: +// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{ +// rag_file}`. +func (r *ProjectsLocationsRagCorporaRagFilesService) Get(name string) *ProjectsLocationsRagCorporaRagFilesGetCall { + c := &ProjectsLocationsRagCorporaRagFilesGetCall{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)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaDeleteCall { +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +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. -func (c *ProjectsLocationsRagCorporaDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaDeleteCall { +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaDeleteCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) 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 *ProjectsLocationsRagCorporaRagFilesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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 } @@ -90217,13 +92382,13 @@ 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.ragFiles.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1RagFile.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 *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RagFile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90242,7 +92407,7 @@ func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1RagFile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90255,84 +92420,79 @@ func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsRagCorporaGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesImportCall struct { + s *Service + parent string + googlecloudaiplatformv1importragfilesrequest *GoogleCloudAiplatformV1ImportRagFilesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a RagCorpus. +// Import: Import files from Google Cloud Storage or Google Drive into a +// RagCorpus. // -// - 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)} - c.name = name +// - 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, googlecloudaiplatformv1importragfilesrequest *GoogleCloudAiplatformV1ImportRagFilesRequest) *ProjectsLocationsRagCorporaRagFilesImportCall { + c := &ProjectsLocationsRagCorporaRagFilesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1importragfilesrequest = googlecloudaiplatformv1importragfilesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsRagCorporaGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaGetCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importragfilesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.get" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RagCorpus.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RagCorpus, error) { +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 { @@ -90351,7 +92511,7 @@ func (c *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1RagCorpus{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90364,7 +92524,7 @@ func (c *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsRagCorporaListCall struct { +type ProjectsLocationsRagCorporaRagFilesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -90373,27 +92533,28 @@ type ProjectsLocationsRagCorporaListCall struct { header_ http.Header } -// List: Lists RagCorpora in a Location. +// List: Lists RagFiles in a RagCorpus. // -// - 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)} +// - 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 *ProjectsLocationsRagCorporaListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaListCall { +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 ListRagCorporaResponse.next_page_token of the -// previous VertexRagDataService.ListRagCorpora call. -func (c *ProjectsLocationsRagCorporaListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaListCall { +// 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 } @@ -90401,7 +92562,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 // details. -func (c *ProjectsLocationsRagCorporaListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -90409,27 +92570,27 @@ func (c *ProjectsLocationsRagCorporaListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an 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. -func (c *ProjectsLocationsRagCorporaListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaListCall { +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. -func (c *ProjectsLocationsRagCorporaListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaListCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) 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 *ProjectsLocationsRagCorporaRagFilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -90437,7 +92598,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, "v1/{+parent}/ragCorpora") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -90450,13 +92611,13 @@ func (c *ProjectsLocationsRagCorporaListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.list" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListRagCorporaResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListRagFilesResponse.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 *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListRagCorporaResponse, error) { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListRagFilesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90475,7 +92636,7 @@ func (c *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListRagCorporaResponse{ + ret := &GoogleCloudAiplatformV1ListRagFilesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90491,7 +92652,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(*GoogleCloudAiplatformV1ListRagCorporaResponse) error) error { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListRagFilesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -90509,60 +92670,62 @@ func (c *ProjectsLocationsRagCorporaListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsRagCorporaPatchCall struct { - s *Service - name string - googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates 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`. // -// - name: Output only. The resource name of the RagCorpus. -func (r *ProjectsLocationsRagCorporaService) Patch(name string, googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus) *ProjectsLocationsRagCorporaPatchCall { - c := &ProjectsLocationsRagCorporaPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) Cancel(name string) *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1ragcorpus = googlecloudaiplatformv1ragcorpus return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaPatchCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaPatchCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaPatchCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaPatchCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1ragcorpus) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -90573,13 +92736,13 @@ func (c *ProjectsLocationsRagCorporaPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.patch" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.cancel" call. // 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 *ProjectsLocationsRagCorporaPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90598,7 +92761,7 @@ func (c *ProjectsLocationsRagCorporaPatchCall) 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, @@ -90611,7 +92774,7 @@ func (c *ProjectsLocationsRagCorporaPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsRagCorporaRagFilesDeleteCall struct { +type ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -90619,13 +92782,14 @@ type ProjectsLocationsRagCorporaRagFilesDeleteCall struct { header_ http.Header } -// Delete: Deletes a RagFile. +// 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 RagFile resource to be deleted. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{ -// rag_file}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) Delete(name string) *ProjectsLocationsRagCorporaRagFilesDeleteCall { - c := &ProjectsLocationsRagCorporaRagFilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) Delete(name string) *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -90633,27 +92797,27 @@ func (r *ProjectsLocationsRagCorporaRagFilesService) Delete(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesDeleteCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesDeleteCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -90671,13 +92835,13 @@ func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.delete" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.delete" call. // 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) { +// *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 *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90696,7 +92860,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Do(opts ...googleapi.Cal 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, @@ -90709,7 +92873,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsRagCorporaRagFilesGetCall struct { +type ProjectsLocationsRagCorporaRagFilesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -90718,13 +92882,13 @@ type ProjectsLocationsRagCorporaRagFilesGetCall struct { header_ http.Header } -// Get: Gets a RagFile. +// 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 RagFile resource. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{ -// rag_file}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) Get(name string) *ProjectsLocationsRagCorporaRagFilesGetCall { - c := &ProjectsLocationsRagCorporaRagFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) Get(name string) *ProjectsLocationsRagCorporaRagFilesOperationsGetCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -90732,7 +92896,7 @@ func (r *ProjectsLocationsRagCorporaRagFilesService) Get(name string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -90740,27 +92904,27 @@ func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Fields(s ...googleapi.Field // IfNoneMatch sets an 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. -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -90781,13 +92945,13 @@ func (c *ProjectsLocationsRagCorporaRagFilesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.get" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RagFile.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RagFile, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90806,7 +92970,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1RagFile{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90819,79 +92983,104 @@ func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsRagCorporaRagFilesImportCall struct { - s *Service - parent string - googlecloudaiplatformv1importragfilesrequest *GoogleCloudAiplatformV1ImportRagFilesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Import files from Google Cloud Storage or Google Drive into a -// RagCorpus. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - 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, googlecloudaiplatformv1importragfilesrequest *GoogleCloudAiplatformV1ImportRagFilesRequest) *ProjectsLocationsRagCorporaRagFilesImportCall { - c := &ProjectsLocationsRagCorporaRagFilesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1importragfilesrequest = googlecloudaiplatformv1importragfilesrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) List(name string) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Filter(filter string) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + 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 // details. -func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesImportCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesImportCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importragfilesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+parent}/ragFiles:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.import" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.list" call. // 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 +// *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 *ProjectsLocationsRagCorporaRagFilesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90910,7 +93099,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90923,100 +93112,109 @@ func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsRagCorporaRagFilesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// 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 +type ProjectsLocationsRagCorporaRagFilesOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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)) +// 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 *ProjectsLocationsRagCorporaRagFilesOperationsService) Wait(name string) *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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) +// 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 *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall { + 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 // details. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesListCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesListCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaRagFilesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v1/{+parent}/ragFiles") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.list" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListRagFilesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListRagFilesResponse, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -91035,7 +93233,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListRagFilesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -91048,27 +93246,6 @@ func (c *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallO return ret, nil } -// 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(*GoogleCloudAiplatformV1ListRagFilesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - type ProjectsLocationsReasoningEnginesCreateCall struct { s *Service parent string diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index d01cbf1c8c5..0d357880a9f 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -950,6 +950,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "deploy": { + "description": "Deploys publisher models.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:deploy", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.deploy", + "parameterOrder": [ + "destination" + ], + "parameters": { + "destination": { + "description": "Required. The resource name of the Location to deploy the model in. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+destination}:deploy", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DeployPublisherModelRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "evaluateInstances": { "description": "Evaluates instances based on a given metric.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:evaluateInstances", @@ -15126,7 +15154,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `display_name` supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"` * `notebookRuntimeType=USER_DEFINED`", + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `display_name` supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` supports = and !=. * `acceleratorType` supports = and !=. Some examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"` * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * `acceleratorType=NVIDIA_TESLA_T4`", "location": "query", "type": "string" }, @@ -15534,7 +15562,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntime` supports = and !=. `notebookRuntime` represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's resource name. * `displayName` supports = and != and regex. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. * API version is UI only: `uiState` supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * `notebookRuntime=\"notebookRuntime123\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"` * `notebookRuntimeTemplate=\"notebookRuntimeTemplate321\"` * `healthState=HEALTHY` * `runtimeState=RUNNING` * `runtimeUser=\"test@google.com\"` * `uiState=UI_RESOURCE_STATE_BEING_DELETED` * `notebookRuntimeType=USER_DEFINED`", + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntime` supports = and !=. `notebookRuntime` represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's resource name. * `displayName` supports = and != and regex. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. * API version is UI only: `uiState` supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` supports = and !=. * `acceleratorType` supports = and !=. Some examples: * `notebookRuntime=\"notebookRuntime123\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"` * `notebookRuntimeTemplate=\"notebookRuntimeTemplate321\"` * `healthState=HEALTHY` * `runtimeState=RUNNING` * `runtimeUser=\"test@google.com\"` * `uiState=UI_RESOURCE_STATE_BEING_DELETED` * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * `acceleratorType=NVIDIA_TESLA_T4`", "location": "query", "type": "string" }, @@ -17793,6 +17821,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamQuery": { + "description": "Streams queries using a reasoning engine.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reasoningEngines/{reasoningEnginesId}:streamQuery", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.reasoningEngines.streamQuery", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ReasoningEngine resource to use. Format: `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:streamQuery", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest" + }, + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -21725,6 +21781,11 @@ "location": "query", "type": "string" }, + "listAllVersions": { + "description": "Optional. List all publisher model versions if the flag is set to true.", + "location": "query", + "type": "boolean" + }, "orderBy": { "description": "Optional. A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending.", "location": "query", @@ -21808,7 +21869,7 @@ } } }, - "revision": "20241119", + "revision": "20241203", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -22106,7 +22167,6 @@ "properties": { "encodedVideo": { "description": "Base 64 encoded video bytes.", - "format": "byte", "type": "string" }, "encoding": { @@ -25927,6 +25987,37 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1DeployPublisherModelRequest": { + "description": "Request message for ModelGardenService.DeployPublisherModel.", + "id": "GoogleCloudAiplatformV1beta1DeployPublisherModelRequest", + "properties": { + "acceptEula": { + "description": "Optional. Whether the user accepts the End User License Agreement (EULA) for the model.", + "type": "boolean" + }, + "dedicatedResources": { + "$ref": "GoogleCloudAiplatformV1beta1DedicatedResources", + "description": "Optional. The dedicated resources to use for the endpoint. If not set, the default resources will be used." + }, + "endpointDisplayName": { + "description": "Optional. The user-specified display name of the endpoint. If not set, a default name will be used.", + "type": "string" + }, + "huggingFaceAccessToken": { + "description": "Optional. The Hugging Face read access token used to access the model artifacts of gated models.", + "type": "string" + }, + "model": { + "description": "Required. The name of the PublisherModel resource. Format: `publishers/{publisher}/models/{publisher_model}@{version_id}`, or `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`", + "type": "string" + }, + "modelDisplayName": { + "description": "Optional. The user-specified display name of the uploaded model. If not set, a default name will be used.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1DeploySolverOperationMetadata": { "description": "Runtime operation information for SolverService.DeploySolver.", "id": "GoogleCloudAiplatformV1beta1DeploySolverOperationMetadata", @@ -26387,14 +26478,17 @@ "description": "Optional. Hyperparameters for Distillation." }, "pipelineRootDirectory": { - "description": "Required. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts.", + "deprecated": true, + "description": "Required. Deprecated. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts.", "type": "string" }, "studentModel": { - "description": "The student model that is being tuned, e.g., \"google/gemma-2b-1.1-it\".", + "deprecated": true, + "description": "The student model that is being tuned, e.g., \"google/gemma-2b-1.1-it\". Deprecated. Use base_model instead.", "type": "string" }, "trainingDatasetUri": { + "deprecated": true, "description": "Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.", "type": "string" }, @@ -26813,6 +26907,30 @@ "toolParameterKvMatchInput": { "$ref": "GoogleCloudAiplatformV1beta1ToolParameterKVMatchInput", "description": "Input for tool parameter key value match metric." + }, + "trajectoryAnyOrderMatchInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput", + "description": "Input for trajectory match any order metric." + }, + "trajectoryExactMatchInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput", + "description": "Input for trajectory exact match metric." + }, + "trajectoryInOrderMatchInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput", + "description": "Input for trajectory in order match metric." + }, + "trajectoryPrecisionInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput", + "description": "Input for trajectory precision metric." + }, + "trajectoryRecallInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallInput", + "description": "Input for trajectory recall metric." + }, + "trajectorySingleToolUseInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput", + "description": "Input for trajectory single tool use metric." } }, "type": "object" @@ -26920,6 +27038,30 @@ "toolParameterKvMatchResults": { "$ref": "GoogleCloudAiplatformV1beta1ToolParameterKVMatchResults", "description": "Results for tool parameter key value match metric." + }, + "trajectoryAnyOrderMatchResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults", + "description": "Result for trajectory any order match metric." + }, + "trajectoryExactMatchResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults", + "description": "Result for trajectory exact match metric." + }, + "trajectoryInOrderMatchResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults", + "description": "Result for trajectory in order match metric." + }, + "trajectoryPrecisionResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults", + "description": "Result for trajectory precision metric." + }, + "trajectoryRecallResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallResults", + "description": "Results for trajectory recall metric." + }, + "trajectorySingleToolUseResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults", + "description": "Results for trajectory single tool use metric." } }, "type": "object" @@ -28409,6 +28551,25 @@ "description": "Identifier. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", "type": "string" }, + "serviceAccountEmail": { + "description": "Output only. A Service Account unique to this FeatureGroup. The role bigquery.dataViewer should be granted to this service account to allow Vertex AI Feature Store to access source data while running jobs under this FeatureGroup.", + "readOnly": true, + "type": "string" + }, + "serviceAgentType": { + "description": "Optional. Service agent type used during jobs under a FeatureGroup. By default, the Vertex AI Service Agent is used. When using an IAM Policy to isolate this FeatureGroup within a project, a separate service account should be provisioned by setting this field to `SERVICE_AGENT_TYPE_FEATURE_GROUP`. This will generate a separate service account to access the BigQuery source table.", + "enum": [ + "SERVICE_AGENT_TYPE_UNSPECIFIED", + "SERVICE_AGENT_TYPE_PROJECT", + "SERVICE_AGENT_TYPE_FEATURE_GROUP" + ], + "enumDescriptions": [ + "By default, the project-level Vertex AI Service Agent is enabled.", + "Specifies the project-level Vertex AI Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).", + "Enable a FeatureGroup service account to be created by Vertex AI and output in the field `service_account_email`. This service account will be used to read from the source BigQuery table during jobs under a FeatureGroup." + ], + "type": "string" + }, "updateTime": { "description": "Output only. Timestamp when this FeatureGroup was last updated.", "format": "google-datetime", @@ -30463,6 +30624,25 @@ "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" }, + "responseModalities": { + "description": "Optional. The modalities of the response.", + "items": { + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "AUDIO" + ], + "enumDescriptions": [ + "Unspecified modality. Will be processed as text.", + "Text modality.", + "Image modality.", + "Audio modality." + ], + "type": "string" + }, + "type": "array" + }, "responseSchema": { "$ref": "GoogleCloudAiplatformV1beta1Schema", "description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response." @@ -30476,6 +30656,10 @@ "format": "int32", "type": "integer" }, + "speechConfig": { + "$ref": "GoogleCloudAiplatformV1beta1SpeechConfig", + "description": "Optional. The speech generation config." + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -30488,6 +30672,22 @@ "format": "float", "type": "number" }, + "tokenResolution": { + "description": "Optional. If specified, the token resolution specified will be used.", + "enum": [ + "TOKEN_RESOLUTION_UNSPECIFIED", + "TOKEN_RESOLUTION_LOW", + "TOKEN_RESOLUTION_MEDIUM", + "TOKEN_RESOLUTION_HIGH" + ], + "enumDescriptions": [ + "Token resolution has not been set.", + "Token resolution set to low (64 tokens).", + "Token resolution set to medium (256 tokens).", + "Token resolution set to high (P\u0026S with 256 tokens)." + ], + "type": "string" + }, "topK": { "description": "Optional. If specified, top-k sampling will be used.", "format": "float", @@ -32993,6 +33193,7 @@ "NVIDIA_A100_80GB", "NVIDIA_L4", "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3", "TPU_V4_POD", @@ -33012,6 +33213,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -33025,6 +33227,7 @@ "Nvidia A100 80GB GPU.", "Nvidia L4 GPU.", "Nvidia H100 80Gb GPU.", + "Nvidia H100 Mega 80Gb GPU.", "TPU v2.", "TPU v3.", "TPU v4.", @@ -36457,6 +36660,11 @@ "readOnly": true, "type": "string" }, + "dataPersistentDiskSpec": { + "$ref": "GoogleCloudAiplatformV1beta1PersistentDiskSpec", + "description": "Output only. The specification of persistent disk attached to the notebook runtime as data disk storage.", + "readOnly": true + }, "description": { "description": "The description of the NotebookRuntime.", "type": "string" @@ -36470,6 +36678,11 @@ "description": "Output only. Customer-managed encryption key spec for the notebook runtime.", "readOnly": true }, + "eucConfig": { + "$ref": "GoogleCloudAiplatformV1beta1NotebookEucConfig", + "description": "Output only. EUC configuration of the notebook runtime.", + "readOnly": true + }, "expirationTime": { "description": "Output only. Timestamp when this NotebookRuntime will be expired: 1. System Predefined NotebookRuntime: 24 hours after creation. After expiration, system predifined runtime will be deleted. 2. User created NotebookRuntime: 6 months after last upgrade. After expiration, user created runtime will be stopped and allowed for upgrade.", "format": "google-datetime", @@ -36508,11 +36721,21 @@ "description": "The labels with user-defined metadata to organize your NotebookRuntime. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one NotebookRuntime (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with \"aiplatform.googleapis.com/\" and are immutable. Following system labels exist for NotebookRuntime: * \"aiplatform.googleapis.com/notebook_runtime_gce_instance_id\": output only, its value is the Compute Engine instance id. * \"aiplatform.googleapis.com/colab_enterprise_entry_service\": its value is either \"bigquery\" or \"vertex\"; if absent, it should be \"vertex\". This is to describe the entry service, either BigQuery or Vertex.", "type": "object" }, + "machineSpec": { + "$ref": "GoogleCloudAiplatformV1beta1MachineSpec", + "description": "Output only. The specification of a single machine used by the notebook runtime.", + "readOnly": true + }, "name": { "description": "Output only. The resource name of the NotebookRuntime.", "readOnly": true, "type": "string" }, + "networkSpec": { + "$ref": "GoogleCloudAiplatformV1beta1NetworkSpec", + "description": "Output only. Network spec of the notebook runtime.", + "readOnly": true + }, "networkTags": { "description": "Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).", "items": { @@ -36585,10 +36808,15 @@ "type": "boolean" }, "serviceAccount": { - "description": "Output only. The service account that the NotebookRuntime workload runs as.", + "description": "Output only. Deprecated: This field is no longer used and the \"Vertex AI Notebook Service Account\" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. The service account that the NotebookRuntime workload runs as.", "readOnly": true, "type": "string" }, + "shieldedVmConfig": { + "$ref": "GoogleCloudAiplatformV1beta1ShieldedVmConfig", + "description": "Output only. Runtime Shielded VM spec.", + "readOnly": true + }, "updateTime": { "description": "Output only. Timestamp when this NotebookRuntime was most recently updated.", "format": "google-datetime", @@ -36642,7 +36870,8 @@ "description": "The idle shutdown configuration of NotebookRuntimeTemplate. This config will only be set when idle shutdown is enabled." }, "isDefault": { - "description": "Output only. The default template to use if not specified.", + "deprecated": true, + "description": "Output only. Deprecated: This field has no behavior. Use notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if not specified.", "readOnly": true, "type": "boolean" }, @@ -36687,7 +36916,8 @@ "type": "string" }, "serviceAccount": { - "description": "The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", + "deprecated": true, + "description": "Deprecated: This field is ignored and the \"Vertex AI Notebook Service Account\" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. For NotebookExecutionJob, use NotebookExecutionJob.service_account instead. The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", "type": "string" }, "shieldedVmConfig": { @@ -37373,7 +37603,7 @@ "properties": { "defaultRuntime": { "$ref": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime", - "description": "Optional. The default runtime for the PipelineJob. If not provided, Vertex Custom Job(on demand) is used as the runtime. For Vertex Custom Job, please refer to https://cloud.google.com/vertex-ai/docs/training/overview." + "description": "Optional. The default runtime for the PipelineJob. If not set, Standard Vertex Custom Job(https://cloud.google.com/vertex-ai/docs/training/overview) is used as the runtime. If set, all pipeline tasks will run on the default runtime unless a task is a GCPC custom job component (https://cloud.google.com/vertex-ai/docs/pipelines/customjob-component) based task. If the task is based on a GCPC custom job component, it runs solely according to the component's configuration." }, "failurePolicy": { "description": "Represents the failure policy of a pipeline. Currently, the default of a pipeline is that the pipeline will continue to run until no more tasks can be executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop scheduling any new tasks when a task has failed. Any scheduled tasks will continue to completion.", @@ -37441,7 +37671,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail": { - "description": "Persistent resource based runtime detail. For more information, refer to https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview", + "description": "Persistent resource based runtime detail. For more information about persistent resource, refer to https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview", "id": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail", "properties": { "persistentResourceName": { @@ -37853,6 +38083,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig": { + "description": "The configuration for the prebuilt speaker to use.", + "id": "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig", + "properties": { + "voiceName": { + "description": "The name of the preset voice to use.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PredefinedSplit": { "description": "Assigns input data to training, validation, and test sets based on the value of a provided key. Supported only for tabular Datasets.", "id": "GoogleCloudAiplatformV1beta1PredefinedSplit", @@ -46028,6 +46269,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SpeechConfig": { + "description": "The speech generation config.", + "id": "GoogleCloudAiplatformV1beta1SpeechConfig", + "properties": { + "voiceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1VoiceConfig", + "description": "The configuration for the speaker to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1StartNotebookRuntimeOperationMetadata": { "description": "Metadata information for NotebookService.StartNotebookRuntime.", "id": "GoogleCloudAiplatformV1beta1StartNotebookRuntimeOperationMetadata", @@ -46087,6 +46339,25 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest": { + "description": "Request message for ReasoningEngineExecutionService.StreamQuery.", + "id": "GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest", + "properties": { + "classMethod": { + "description": "Optional. Class method to be used for the stream query. It is optional and defaults to \"stream_query\" if unspecified.", + "type": "string" + }, + "input": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Input content provided by users in JSON object format. Examples include text query, function calling parameters, media bytes, etc.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1StreamRawPredictRequest": { "description": "Request message for PredictionService.StreamRawPredict.", "id": "GoogleCloudAiplatformV1beta1StreamRawPredictRequest", @@ -47928,6 +48199,10 @@ }, "type": "array" }, + "googleSearch": { + "$ref": "GoogleCloudAiplatformV1beta1ToolGoogleSearch", + "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google." + }, "googleSearchRetrieval": { "$ref": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", "description": "Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search." @@ -47939,6 +48214,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ToolCall": { + "description": "Spec for tool call.", + "id": "GoogleCloudAiplatformV1beta1ToolCall", + "properties": { + "toolInput": { + "description": "Optional. Spec for tool input", + "type": "string" + }, + "toolName": { + "description": "Required. Spec for tool name", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ToolCallValidInput": { "description": "Input for tool call valid metric.", "id": "GoogleCloudAiplatformV1beta1ToolCallValidInput", @@ -48023,6 +48313,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ToolGoogleSearch": { + "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", + "id": "GoogleCloudAiplatformV1beta1ToolGoogleSearch", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ToolNameMatchInput": { "description": "Input for tool name match metric.", "id": "GoogleCloudAiplatformV1beta1ToolNameMatchInput", @@ -48411,6 +48707,423 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Trajectory": { + "description": "Spec for trajectory.", + "id": "GoogleCloudAiplatformV1beta1Trajectory", + "properties": { + "toolCalls": { + "description": "Required. Tool calls in the trajectory.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1ToolCall" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput": { + "description": "Instances and metric spec for TrajectoryAnyOrderMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryAnyOrderMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec", + "description": "Required. Spec for TrajectoryAnyOrderMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance": { + "description": "Spec for TrajectoryAnyOrderMatch instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue": { + "description": "TrajectoryAnyOrderMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryAnyOrderMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults": { + "description": "Results for TrajectoryAnyOrderMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults", + "properties": { + "trajectoryAnyOrderMatchMetricValues": { + "description": "Output only. TrajectoryAnyOrderMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec": { + "description": "Spec for TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the reference trajectory appear in the predicted trajectory in any order, else 0.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput": { + "description": "Instances and metric spec for TrajectoryExactMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryExactMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec", + "description": "Required. Spec for TrajectoryExactMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance": { + "description": "Spec for TrajectoryExactMatch instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue": { + "description": "TrajectoryExactMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryExactMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults": { + "description": "Results for TrajectoryExactMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults", + "properties": { + "trajectoryExactMatchMetricValues": { + "description": "Output only. TrajectoryExactMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec": { + "description": "Spec for TrajectoryExactMatch metric - returns 1 if tool calls in the reference trajectory exactly match the predicted trajectory, else 0.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput": { + "description": "Instances and metric spec for TrajectoryInOrderMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryInOrderMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec", + "description": "Required. Spec for TrajectoryInOrderMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance": { + "description": "Spec for TrajectoryInOrderMatch instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue": { + "description": "TrajectoryInOrderMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryInOrderMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults": { + "description": "Results for TrajectoryInOrderMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults", + "properties": { + "trajectoryInOrderMatchMetricValues": { + "description": "Output only. TrajectoryInOrderMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec": { + "description": "Spec for TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference trajectory appear in the predicted trajectory in the same order, else 0.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput": { + "description": "Instances and metric spec for TrajectoryPrecision metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryPrecision instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec", + "description": "Required. Spec for TrajectoryPrecision metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance": { + "description": "Spec for TrajectoryPrecision instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue": { + "description": "TrajectoryPrecision metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryPrecision score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults": { + "description": "Results for TrajectoryPrecision metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults", + "properties": { + "trajectoryPrecisionMetricValues": { + "description": "Output only. TrajectoryPrecision metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec": { + "description": "Spec for TrajectoryPrecision metric - returns a float score based on average precision of individual tool calls.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallInput": { + "description": "Instances and metric spec for TrajectoryRecall metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryRecall instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallSpec", + "description": "Required. Spec for TrajectoryRecall metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallInstance": { + "description": "Spec for TrajectoryRecall instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue": { + "description": "TrajectoryRecall metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryRecall score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallResults": { + "description": "Results for TrajectoryRecall metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallResults", + "properties": { + "trajectoryRecallMetricValues": { + "description": "Output only. TrajectoryRecall metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallSpec": { + "description": "Spec for TrajectoryRecall metric - returns a float score based on average recall of individual tool calls.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput": { + "description": "Instances and metric spec for TrajectorySingleToolUse metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectorySingleToolUse instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec", + "description": "Required. Spec for TrajectorySingleToolUse metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance": { + "description": "Spec for TrajectorySingleToolUse instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue": { + "description": "TrajectorySingleToolUse metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectorySingleToolUse score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults": { + "description": "Results for TrajectorySingleToolUse metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults", + "properties": { + "trajectorySingleToolUseMetricValues": { + "description": "Output only. TrajectorySingleToolUse metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec": { + "description": "Spec for TrajectorySingleToolUse metric - returns 1 if tool is present in the predicted trajectory, else 0.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec", + "properties": { + "toolName": { + "description": "Required. Spec for tool name to be checked for in the predicted trajectory.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Trial": { "description": "A message representing a Trial. A Trial contains a unique set of Parameters that has been or will be evaluated, along with the objective metrics got by running the Trial.", "id": "GoogleCloudAiplatformV1beta1Trial", @@ -49279,6 +49992,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1VoiceConfig": { + "description": "The configuration for the voice to use.", + "id": "GoogleCloudAiplatformV1beta1VoiceConfig", + "properties": { + "prebuiltVoiceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig", + "description": "The configuration for the prebuilt voice to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1WorkerPoolSpec": { "description": "Represents the spec of a worker pool in a job.", "id": "GoogleCloudAiplatformV1beta1WorkerPoolSpec", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 8902468f349..02af4f316af 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -7707,6 +7707,46 @@ func (s GoogleCloudAiplatformV1beta1DeployModelResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1DeployPublisherModelRequest: Request message for +// ModelGardenService.DeployPublisherModel. +type GoogleCloudAiplatformV1beta1DeployPublisherModelRequest struct { + // AcceptEula: Optional. Whether the user accepts the End User License + // Agreement (EULA) for the model. + AcceptEula bool `json:"acceptEula,omitempty"` + // DedicatedResources: Optional. The dedicated resources to use for the + // endpoint. If not set, the default resources will be used. + DedicatedResources *GoogleCloudAiplatformV1beta1DedicatedResources `json:"dedicatedResources,omitempty"` + // EndpointDisplayName: Optional. The user-specified display name of the + // endpoint. If not set, a default name will be used. + EndpointDisplayName string `json:"endpointDisplayName,omitempty"` + // HuggingFaceAccessToken: Optional. The Hugging Face read access token used to + // access the model artifacts of gated models. + HuggingFaceAccessToken string `json:"huggingFaceAccessToken,omitempty"` + // Model: Required. The name of the PublisherModel resource. Format: + // `publishers/{publisher}/models/{publisher_model}@{version_id}`, or + // `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001` + Model string `json:"model,omitempty"` + // ModelDisplayName: Optional. The user-specified display name of the uploaded + // model. If not set, a default name will be used. + ModelDisplayName string `json:"modelDisplayName,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptEula") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptEula") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1DeployPublisherModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1DeployPublisherModelRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1DeploySolverOperationMetadata: Runtime operation // information for SolverService.DeploySolver. type GoogleCloudAiplatformV1beta1DeploySolverOperationMetadata struct { @@ -8363,12 +8403,13 @@ type GoogleCloudAiplatformV1beta1DistillationSpec struct { BaseTeacherModel string `json:"baseTeacherModel,omitempty"` // HyperParameters: Optional. Hyperparameters for Distillation. HyperParameters *GoogleCloudAiplatformV1beta1DistillationHyperParameters `json:"hyperParameters,omitempty"` - // PipelineRootDirectory: Required. A path in a Cloud Storage bucket, which - // will be treated as the root output directory of the distillation pipeline. - // It is used by the system to generate the paths of output artifacts. + // PipelineRootDirectory: Required. Deprecated. A path in a Cloud Storage + // bucket, which will be treated as the root output directory of the + // distillation pipeline. It is used by the system to generate the paths of + // output artifacts. PipelineRootDirectory string `json:"pipelineRootDirectory,omitempty"` // StudentModel: The student model that is being tuned, e.g., - // "google/gemma-2b-1.1-it". + // "google/gemma-2b-1.1-it". Deprecated. Use base_model instead. StudentModel string `json:"studentModel,omitempty"` // TrainingDatasetUri: Required. Cloud Storage path to file containing training // dataset for tuning. The dataset must be formatted as a JSONL file. @@ -8896,6 +8937,18 @@ type GoogleCloudAiplatformV1beta1EvaluateInstancesRequest struct { ToolParameterKeyMatchInput *GoogleCloudAiplatformV1beta1ToolParameterKeyMatchInput `json:"toolParameterKeyMatchInput,omitempty"` // ToolParameterKvMatchInput: Input for tool parameter key value match metric. ToolParameterKvMatchInput *GoogleCloudAiplatformV1beta1ToolParameterKVMatchInput `json:"toolParameterKvMatchInput,omitempty"` + // TrajectoryAnyOrderMatchInput: Input for trajectory match any order metric. + TrajectoryAnyOrderMatchInput *GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput `json:"trajectoryAnyOrderMatchInput,omitempty"` + // TrajectoryExactMatchInput: Input for trajectory exact match metric. + TrajectoryExactMatchInput *GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput `json:"trajectoryExactMatchInput,omitempty"` + // TrajectoryInOrderMatchInput: Input for trajectory in order match metric. + TrajectoryInOrderMatchInput *GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput `json:"trajectoryInOrderMatchInput,omitempty"` + // TrajectoryPrecisionInput: Input for trajectory precision metric. + TrajectoryPrecisionInput *GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput `json:"trajectoryPrecisionInput,omitempty"` + // TrajectoryRecallInput: Input for trajectory recall metric. + TrajectoryRecallInput *GoogleCloudAiplatformV1beta1TrajectoryRecallInput `json:"trajectoryRecallInput,omitempty"` + // TrajectorySingleToolUseInput: Input for trajectory single tool use metric. + TrajectorySingleToolUseInput *GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput `json:"trajectorySingleToolUseInput,omitempty"` // ForceSendFields is a list of field names (e.g. "BleuInput") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -8977,6 +9030,20 @@ type GoogleCloudAiplatformV1beta1EvaluateInstancesResponse struct { // ToolParameterKvMatchResults: Results for tool parameter key value match // metric. ToolParameterKvMatchResults *GoogleCloudAiplatformV1beta1ToolParameterKVMatchResults `json:"toolParameterKvMatchResults,omitempty"` + // TrajectoryAnyOrderMatchResults: Result for trajectory any order match + // metric. + TrajectoryAnyOrderMatchResults *GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults `json:"trajectoryAnyOrderMatchResults,omitempty"` + // TrajectoryExactMatchResults: Result for trajectory exact match metric. + TrajectoryExactMatchResults *GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults `json:"trajectoryExactMatchResults,omitempty"` + // TrajectoryInOrderMatchResults: Result for trajectory in order match metric. + TrajectoryInOrderMatchResults *GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults `json:"trajectoryInOrderMatchResults,omitempty"` + // TrajectoryPrecisionResults: Result for trajectory precision metric. + TrajectoryPrecisionResults *GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults `json:"trajectoryPrecisionResults,omitempty"` + // TrajectoryRecallResults: Results for trajectory recall metric. + TrajectoryRecallResults *GoogleCloudAiplatformV1beta1TrajectoryRecallResults `json:"trajectoryRecallResults,omitempty"` + // TrajectorySingleToolUseResults: Results for trajectory single tool use + // metric. + TrajectorySingleToolUseResults *GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults `json:"trajectorySingleToolUseResults,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -11082,6 +11149,29 @@ type GoogleCloudAiplatformV1beta1FeatureGroup struct { // Name: Identifier. Name of the FeatureGroup. Format: // `projects/{project}/locations/{location}/featureGroups/{featureGroup}` Name string `json:"name,omitempty"` + // ServiceAccountEmail: Output only. A Service Account unique to this + // FeatureGroup. The role bigquery.dataViewer should be granted to this service + // account to allow Vertex AI Feature Store to access source data while running + // jobs under this FeatureGroup. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + // ServiceAgentType: Optional. Service agent type used during jobs under a + // FeatureGroup. By default, the Vertex AI Service Agent is used. When using an + // IAM Policy to isolate this FeatureGroup within a project, a separate service + // account should be provisioned by setting this field to + // `SERVICE_AGENT_TYPE_FEATURE_GROUP`. This will generate a separate service + // account to access the BigQuery source table. + // + // Possible values: + // "SERVICE_AGENT_TYPE_UNSPECIFIED" - By default, the project-level Vertex AI + // Service Agent is enabled. + // "SERVICE_AGENT_TYPE_PROJECT" - Specifies the project-level Vertex AI + // Service Agent + // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + // "SERVICE_AGENT_TYPE_FEATURE_GROUP" - Enable a FeatureGroup service account + // to be created by Vertex AI and output in the field `service_account_email`. + // This service account will be used to read from the source BigQuery table + // during jobs under a FeatureGroup. + ServiceAgentType string `json:"serviceAgentType,omitempty"` // UpdateTime: Output only. Timestamp when this FeatureGroup was last updated. UpdateTime string `json:"updateTime,omitempty"` @@ -14106,6 +14196,14 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` + // ResponseModalities: Optional. The modalities of the response. + // + // Possible values: + // "MODALITY_UNSPECIFIED" - Unspecified modality. Will be processed as text. + // "TEXT" - Text modality. + // "IMAGE" - Image modality. + // "AUDIO" - Audio modality. + ResponseModalities []string `json:"responseModalities,omitempty"` // ResponseSchema: Optional. The `Schema` object allows the definition of input // and output data types. These types can be objects, but also primitives and // arrays. Represents a select subset of an OpenAPI 3.0 schema object @@ -14117,10 +14215,22 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { RoutingConfig *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig `json:"routingConfig,omitempty"` // Seed: Optional. Seed. Seed int64 `json:"seed,omitempty"` + // SpeechConfig: Optional. The speech generation config. + SpeechConfig *GoogleCloudAiplatformV1beta1SpeechConfig `json:"speechConfig,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. Temperature float64 `json:"temperature,omitempty"` + // TokenResolution: Optional. If specified, the token resolution specified will + // be used. + // + // Possible values: + // "TOKEN_RESOLUTION_UNSPECIFIED" - Token resolution has not been set. + // "TOKEN_RESOLUTION_LOW" - Token resolution set to low (64 tokens). + // "TOKEN_RESOLUTION_MEDIUM" - Token resolution set to medium (256 tokens). + // "TOKEN_RESOLUTION_HIGH" - Token resolution set to high (P&S with 256 + // tokens). + TokenResolution string `json:"tokenResolution,omitempty"` // TopK: Optional. If specified, top-k sampling will be used. TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. @@ -17769,6 +17879,7 @@ type GoogleCloudAiplatformV1beta1MachineSpec struct { // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. // "NVIDIA_L4" - Nvidia L4 GPU. // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. + // "NVIDIA_H100_MEGA_80GB" - Nvidia H100 Mega 80Gb GPU. // "TPU_V2" - TPU v2. // "TPU_V3" - TPU v3. // "TPU_V4_POD" - TPU v4. @@ -22568,6 +22679,9 @@ func (s GoogleCloudAiplatformV1beta1NotebookIdleShutdownConfig) MarshalJSON() ([ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // CreateTime: Output only. Timestamp when this NotebookRuntime was created. CreateTime string `json:"createTime,omitempty"` + // DataPersistentDiskSpec: Output only. The specification of persistent disk + // attached to the notebook runtime as data disk storage. + DataPersistentDiskSpec *GoogleCloudAiplatformV1beta1PersistentDiskSpec `json:"dataPersistentDiskSpec,omitempty"` // Description: The description of the NotebookRuntime. Description string `json:"description,omitempty"` // DisplayName: Required. The display name of the NotebookRuntime. The name can @@ -22576,6 +22690,8 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // EncryptionSpec: Output only. Customer-managed encryption key spec for the // notebook runtime. EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` + // EucConfig: Output only. EUC configuration of the notebook runtime. + EucConfig *GoogleCloudAiplatformV1beta1NotebookEucConfig `json:"eucConfig,omitempty"` // ExpirationTime: Output only. Timestamp when this NotebookRuntime will be // expired: 1. System Predefined NotebookRuntime: 24 hours after creation. // After expiration, system predifined runtime will be deleted. 2. User created @@ -22610,8 +22726,13 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // either "bigquery" or "vertex"; if absent, it should be "vertex". This is to // describe the entry service, either BigQuery or Vertex. Labels map[string]string `json:"labels,omitempty"` + // MachineSpec: Output only. The specification of a single machine used by the + // notebook runtime. + MachineSpec *GoogleCloudAiplatformV1beta1MachineSpec `json:"machineSpec,omitempty"` // Name: Output only. The resource name of the NotebookRuntime. Name string `json:"name,omitempty"` + // NetworkSpec: Output only. Network spec of the notebook runtime. + NetworkSpec *GoogleCloudAiplatformV1beta1NetworkSpec `json:"networkSpec,omitempty"` // NetworkTags: Optional. The Compute Engine tags to add to runtime (see // Tagging instances // (https://cloud.google.com/vpc/docs/add-remove-network-tags)). @@ -22651,9 +22772,16 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` // SatisfiesPzs: Output only. Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // ServiceAccount: Output only. The service account that the NotebookRuntime - // workload runs as. + // ServiceAccount: Output only. Deprecated: This field is no longer used and + // the "Vertex AI Notebook Service Account" + // (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is + // used for the runtime workload identity. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + // for more details. The service account that the NotebookRuntime workload runs + // as. ServiceAccount string `json:"serviceAccount,omitempty"` + // ShieldedVmConfig: Output only. Runtime Shielded VM spec. + ShieldedVmConfig *GoogleCloudAiplatformV1beta1ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` // UpdateTime: Output only. Timestamp when this NotebookRuntime was most // recently updated. UpdateTime string `json:"updateTime,omitempty"` @@ -22709,7 +22837,9 @@ type GoogleCloudAiplatformV1beta1NotebookRuntimeTemplate struct { // NotebookRuntimeTemplate. This config will only be set when idle shutdown is // enabled. IdleShutdownConfig *GoogleCloudAiplatformV1beta1NotebookIdleShutdownConfig `json:"idleShutdownConfig,omitempty"` - // IsDefault: Output only. The default template to use if not specified. + // IsDefault: Output only. Deprecated: This field has no behavior. Use + // notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if + // not specified. IsDefault bool `json:"isDefault,omitempty"` // Labels: The labels with user-defined metadata to organize the // NotebookRuntimeTemplates. Label keys and values can be no longer than 64 @@ -22738,10 +22868,16 @@ type GoogleCloudAiplatformV1beta1NotebookRuntimeTemplate struct { // user. // "ONE_CLICK" - runtime or template with system defined configurations. NotebookRuntimeType string `json:"notebookRuntimeType,omitempty"` - // ServiceAccount: The service account that the runtime workload runs as. You - // can use any service account within the same project, but you must have the - // service account user permission to use the instance. If not specified, the - // Compute Engine default service account + // ServiceAccount: Deprecated: This field is ignored and the "Vertex AI + // Notebook Service Account" + // (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is + // used for the runtime workload identity. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + // for more details. For NotebookExecutionJob, use + // NotebookExecutionJob.service_account instead. The service account that the + // runtime workload runs as. You can use any service account within the same + // project, but you must have the service account user permission to use the + // instance. If not specified, the Compute Engine default service account // (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) // is used. ServiceAccount string `json:"serviceAccount,omitempty"` @@ -23571,9 +23707,13 @@ func (s GoogleCloudAiplatformV1beta1PipelineJobDetail) MarshalJSON() ([]byte, er // a PipelineJob. type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig struct { // DefaultRuntime: Optional. The default runtime for the PipelineJob. If not - // provided, Vertex Custom Job(on demand) is used as the runtime. For Vertex - // Custom Job, please refer to - // https://cloud.google.com/vertex-ai/docs/training/overview. + // set, Standard Vertex Custom + // Job(https://cloud.google.com/vertex-ai/docs/training/overview) is used as + // the runtime. If set, all pipeline tasks will run on the default runtime + // unless a task is a GCPC custom job component + // (https://cloud.google.com/vertex-ai/docs/pipelines/customjob-component) + // based task. If the task is based on a GCPC custom job component, it runs + // solely according to the component's configuration. DefaultRuntime *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime `json:"defaultRuntime,omitempty"` // FailurePolicy: Represents the failure policy of a pipeline. Currently, the // default of a pipeline is that the pipeline will continue to run until no @@ -23684,8 +23824,8 @@ func (s GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigInputArtifact) Marsh } // GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntime -// Detail: Persistent resource based runtime detail. For more information, -// refer to +// Detail: Persistent resource based runtime detail. For more information about +// persistent resource, refer to // https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail struct { // PersistentResourceName: Persistent resource name. Format: @@ -24191,6 +24331,29 @@ func (s GoogleCloudAiplatformV1beta1Port) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig: The configuration for the +// prebuilt speaker to use. +type GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig struct { + // VoiceName: The name of the preset voice to use. + VoiceName string `json:"voiceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PredefinedSplit: Assigns input data to training, // validation, and test sets based on the value of a provided key. Supported // only for tabular Datasets. @@ -36811,6 +36974,28 @@ func (s GoogleCloudAiplatformV1beta1SpecialistPool) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1SpeechConfig: The speech generation config. +type GoogleCloudAiplatformV1beta1SpeechConfig struct { + // VoiceConfig: The configuration for the speaker to use. + VoiceConfig *GoogleCloudAiplatformV1beta1VoiceConfig `json:"voiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SpeechConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SpeechConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1StartNotebookRuntimeOperationMetadata: Metadata // information for NotebookService.StartNotebookRuntime. type GoogleCloudAiplatformV1beta1StartNotebookRuntimeOperationMetadata struct { @@ -36914,6 +37099,33 @@ func (s *GoogleCloudAiplatformV1beta1StratifiedSplit) UnmarshalJSON(data []byte) return nil } +// GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest: Request +// message for ReasoningEngineExecutionService.StreamQuery. +type GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest struct { + // ClassMethod: Optional. Class method to be used for the stream query. It is + // optional and defaults to "stream_query" if unspecified. + ClassMethod string `json:"classMethod,omitempty"` + // Input: Optional. Input content provided by users in JSON object format. + // Examples include text query, function calling parameters, media bytes, etc. + Input googleapi.RawMessage `json:"input,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClassMethod") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ClassMethod") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1StreamRawPredictRequest: Request message for // PredictionService.StreamRawPredict. type GoogleCloudAiplatformV1beta1StreamRawPredictRequest struct { @@ -39434,6 +39646,9 @@ type GoogleCloudAiplatformV1beta1Tool struct { // will generate the final response back to the user. Maximum 128 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearch: Optional. GoogleSearch tool type. Tool to support Google + // Search in Model. Powered by Google. + GoogleSearch *GoogleCloudAiplatformV1beta1ToolGoogleSearch `json:"googleSearch,omitempty"` // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. // Specialized retrieval tool that is powered by Google search. GoogleSearchRetrieval *GoogleCloudAiplatformV1beta1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` @@ -39459,6 +39674,30 @@ func (s GoogleCloudAiplatformV1beta1Tool) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ToolCall: Spec for tool call. +type GoogleCloudAiplatformV1beta1ToolCall struct { + // ToolInput: Optional. Spec for tool input + ToolInput string `json:"toolInput,omitempty"` + // ToolName: Required. Spec for tool name + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInput") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolInput") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1ToolCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ToolCall + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1ToolCallValidInput: Input for tool call valid // metric. type GoogleCloudAiplatformV1beta1ToolCallValidInput struct { @@ -39604,6 +39843,11 @@ func (s GoogleCloudAiplatformV1beta1ToolConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ToolGoogleSearch: GoogleSearch tool type. Tool +// to support Google Search in Model. Powered by Google. +type GoogleCloudAiplatformV1beta1ToolGoogleSearch struct { +} + // GoogleCloudAiplatformV1beta1ToolNameMatchInput: Input for tool name match // metric. type GoogleCloudAiplatformV1beta1ToolNameMatchInput struct { @@ -40182,6 +40426,756 @@ func (s GoogleCloudAiplatformV1beta1TrainingPipeline) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Trajectory: Spec for trajectory. +type GoogleCloudAiplatformV1beta1Trajectory struct { + // ToolCalls: Required. Tool calls in the trajectory. + ToolCalls []*GoogleCloudAiplatformV1beta1ToolCall `json:"toolCalls,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolCalls") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolCalls") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1Trajectory) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Trajectory + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput: Instances and +// metric spec for TrajectoryAnyOrderMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput struct { + // Instances: Required. Repeated TrajectoryAnyOrderMatch instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryAnyOrderMatch metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance: Spec for +// TrajectoryAnyOrderMatch instance. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue: +// TrajectoryAnyOrderMatch metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue struct { + // Score: Output only. TrajectoryAnyOrderMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults: Results for +// TrajectoryAnyOrderMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults struct { + // TrajectoryAnyOrderMatchMetricValues: Output only. TrajectoryAnyOrderMatch + // metric values. + TrajectoryAnyOrderMatchMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue `json:"trajectoryAnyOrderMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryAnyOrderMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectoryAnyOrderMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec: Spec for +// TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the +// reference trajectory appear in the predicted trajectory in any order, else +// 0. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput: Instances and metric +// spec for TrajectoryExactMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput struct { + // Instances: Required. Repeated TrajectoryExactMatch instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryExactMatch metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance: Spec for +// TrajectoryExactMatch instance. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue: +// TrajectoryExactMatch metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue struct { + // Score: Output only. TrajectoryExactMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults: Results for +// TrajectoryExactMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults struct { + // TrajectoryExactMatchMetricValues: Output only. TrajectoryExactMatch metric + // values. + TrajectoryExactMatchMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue `json:"trajectoryExactMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryExactMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectoryExactMatchMetricValues") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec: Spec for +// TrajectoryExactMatch metric - returns 1 if tool calls in the reference +// trajectory exactly match the predicted trajectory, else 0. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput: Instances and +// metric spec for TrajectoryInOrderMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput struct { + // Instances: Required. Repeated TrajectoryInOrderMatch instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryInOrderMatch metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance: Spec for +// TrajectoryInOrderMatch instance. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue: +// TrajectoryInOrderMatch metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue struct { + // Score: Output only. TrajectoryInOrderMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults: Results for +// TrajectoryInOrderMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults struct { + // TrajectoryInOrderMatchMetricValues: Output only. TrajectoryInOrderMatch + // metric values. + TrajectoryInOrderMatchMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue `json:"trajectoryInOrderMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryInOrderMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectoryInOrderMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec: Spec for +// TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference +// trajectory appear in the predicted trajectory in the same order, else 0. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput: Instances and metric +// spec for TrajectoryPrecision metric. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput struct { + // Instances: Required. Repeated TrajectoryPrecision instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryPrecision metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance: Spec for +// TrajectoryPrecision instance. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue: +// TrajectoryPrecision metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue struct { + // Score: Output only. TrajectoryPrecision score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults: Results for +// TrajectoryPrecision metric. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults struct { + // TrajectoryPrecisionMetricValues: Output only. TrajectoryPrecision metric + // values. + TrajectoryPrecisionMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue `json:"trajectoryPrecisionMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryPrecisionMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TrajectoryPrecisionMetricValues") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec: Spec for +// TrajectoryPrecision metric - returns a float score based on average +// precision of individual tool calls. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallInput: Instances and metric spec +// for TrajectoryRecall metric. +type GoogleCloudAiplatformV1beta1TrajectoryRecallInput struct { + // Instances: Required. Repeated TrajectoryRecall instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryRecallInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryRecall metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryRecallSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryRecallInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallInstance: Spec for +// TrajectoryRecall instance. +type GoogleCloudAiplatformV1beta1TrajectoryRecallInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryRecallInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue: TrajectoryRecall +// metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue struct { + // Score: Output only. TrajectoryRecall score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallResults: Results for +// TrajectoryRecall metric. +type GoogleCloudAiplatformV1beta1TrajectoryRecallResults struct { + // TrajectoryRecallMetricValues: Output only. TrajectoryRecall metric values. + TrajectoryRecallMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue `json:"trajectoryRecallMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryRecallMetricValues") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TrajectoryRecallMetricValues") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryRecallResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallSpec: Spec for TrajectoryRecall +// metric - returns a float score based on average recall of individual tool +// calls. +type GoogleCloudAiplatformV1beta1TrajectoryRecallSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput: Instances and +// metric spec for TrajectorySingleToolUse metric. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput struct { + // Instances: Required. Repeated TrajectorySingleToolUse instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectorySingleToolUse metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance: Spec for +// TrajectorySingleToolUse instance. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue: +// TrajectorySingleToolUse metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue struct { + // Score: Output only. TrajectorySingleToolUse score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults: Results for +// TrajectorySingleToolUse metric. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults struct { + // TrajectorySingleToolUseMetricValues: Output only. TrajectorySingleToolUse + // metric values. + TrajectorySingleToolUseMetricValues []*GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue `json:"trajectorySingleToolUseMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectorySingleToolUseMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectorySingleToolUseMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec: Spec for +// TrajectorySingleToolUse metric - returns 1 if tool is present in the +// predicted trajectory, else 0. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec struct { + // ToolName: Required. Spec for tool name to be checked for in the predicted + // trajectory. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Trial: A message representing a Trial. A Trial // contains a unique set of Parameters that has been or will be evaluated, // along with the objective metrics got by running the Trial. @@ -41507,6 +42501,29 @@ func (s GoogleCloudAiplatformV1beta1VideoMetadata) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1VoiceConfig: The configuration for the voice to +// use. +type GoogleCloudAiplatformV1beta1VoiceConfig struct { + // PrebuiltVoiceConfig: The configuration for the prebuilt voice to use. + PrebuiltVoiceConfig *GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig `json:"prebuiltVoiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrebuiltVoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PrebuiltVoiceConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1VoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1WorkerPoolSpec: Represents the spec of a worker // pool in a job. type GoogleCloudAiplatformV1beta1WorkerPoolSpec struct { @@ -44785,6 +45802,109 @@ func (c *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsDeployCall struct { + s *Service + destination string + googlecloudaiplatformv1beta1deploypublishermodelrequest *GoogleCloudAiplatformV1beta1DeployPublisherModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Deploy: Deploys publisher models. +// +// - destination: The resource name of the Location to deploy the model in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) Deploy(destination string, googlecloudaiplatformv1beta1deploypublishermodelrequest *GoogleCloudAiplatformV1beta1DeployPublisherModelRequest) *ProjectsLocationsDeployCall { + c := &ProjectsLocationsDeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.destination = destination + c.googlecloudaiplatformv1beta1deploypublishermodelrequest = googlecloudaiplatformv1beta1deploypublishermodelrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDeployCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeployCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDeployCall) Context(ctx context.Context) *ProjectsLocationsDeployCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDeployCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeployCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1deploypublishermodelrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+destination}:deploy") + 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{ + "destination": c.destination, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.deploy" call. +// 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 *ProjectsLocationsDeployCall) 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 +} + type ProjectsLocationsEvaluateInstancesCall struct { s *Service location string @@ -96906,10 +98026,12 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesService) List(parent string) * // that is: * `labels.key=value` - key:value equality * `labels.key:* or // labels:key - key existence * A key including a space must be quoted. // `labels."a key". * `notebookRuntimeType` supports = and !=. -// notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * +// notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` +// supports = and !=. * `acceleratorType` supports = and !=. Some examples: * // `notebookRuntimeTemplate=notebookRuntimeTemplate123` * // `displayName="myDisplayName" * `labels.myKey="myValue" * -// `notebookRuntimeType=USER_DEFINED` +// `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * +// `acceleratorType=NVIDIA_TESLA_T4` func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.urlParams_.Set("filter", filter) return c @@ -98421,13 +99543,15 @@ func (r *ProjectsLocationsNotebookRuntimesService) List(parent string) *Projects // [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, // UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, // UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and -// !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * +// !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` +// supports = and !=. * `acceleratorType` supports = and !=. Some examples: * // `notebookRuntime="notebookRuntime123" * `displayName="myDisplayName" and // `displayName=~"myDisplayNameRegex" * // `notebookRuntimeTemplate="notebookRuntimeTemplate321" * // `healthState=HEALTHY` * `runtimeState=RUNNING` * // `runtimeUser="test@google.com" * `uiState=UI_RESOURCE_STATE_BEING_DELETED` -// * `notebookRuntimeType=USER_DEFINED` +// * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * +// `acceleratorType=NVIDIA_TESLA_T4` func (c *ProjectsLocationsNotebookRuntimesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("filter", filter) return c @@ -106353,345 +107477,449 @@ func (c *ProjectsLocationsReasoningEnginesDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsReasoningEnginesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReasoningEnginesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a reasoning engine. +// +// - name: The name of the ReasoningEngine resource. Format: +// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine +// }`. +func (r *ProjectsLocationsReasoningEnginesService) Get(name string) *ProjectsLocationsReasoningEnginesGetCall { + c := &ProjectsLocationsReasoningEnginesGetCall{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 +// details. +func (c *ProjectsLocationsReasoningEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsReasoningEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReasoningEnginesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReasoningEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReasoningEnginesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReasoningEnginesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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.reasoningEngines.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ReasoningEngine.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 *ProjectsLocationsReasoningEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ReasoningEngine, 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 := &GoogleCloudAiplatformV1beta1ReasoningEngine{ + 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 +} + +type ProjectsLocationsReasoningEnginesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists reasoning engines in a location. +// +// - parent: The resource name of the Location to list the ReasoningEngines +// from. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsReasoningEnginesService) List(parent string) *ProjectsLocationsReasoningEnginesListCall { + c := &ProjectsLocationsReasoningEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. More +// detail in AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsReasoningEnginesListCall) Filter(filter string) *ProjectsLocationsReasoningEnginesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsReasoningEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsReasoningEnginesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsReasoningEnginesListCall) PageToken(pageToken string) *ProjectsLocationsReasoningEnginesListCall { + 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 +// details. +func (c *ProjectsLocationsReasoningEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsReasoningEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReasoningEnginesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReasoningEnginesListCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReasoningEnginesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReasoningEnginesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/reasoningEngines") + 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.reasoningEngines.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse.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 *ProjectsLocationsReasoningEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse, 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 := &GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse{ + 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 +} + +// 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 *ProjectsLocationsReasoningEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsReasoningEnginesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a reasoning engine. +// +// - name: Identifier. The resource name of the ReasoningEngine. +func (r *ProjectsLocationsReasoningEnginesService) Patch(name string, googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine) *ProjectsLocationsReasoningEnginesPatchCall { + c := &ProjectsLocationsReasoningEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1reasoningengine = googlecloudaiplatformv1beta1reasoningengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Mask specifying which +// fields to update. +func (c *ProjectsLocationsReasoningEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsReasoningEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReasoningEnginesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1reasoningengine) + if err != nil { + return nil, err + } + 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("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.reasoningEngines.patch" call. +// 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 *ProjectsLocationsReasoningEnginesPatchCall) 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 +} + +type ProjectsLocationsReasoningEnginesQueryCall struct { + s *Service + name string + googlecloudaiplatformv1beta1queryreasoningenginerequest *GoogleCloudAiplatformV1beta1QueryReasoningEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a reasoning engine. +// Query: Queries using a reasoning engine. // -// - name: The name of the ReasoningEngine resource. Format: +// - name: The name of the ReasoningEngine resource to use. Format: // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine // }`. -func (r *ProjectsLocationsReasoningEnginesService) Get(name string) *ProjectsLocationsReasoningEnginesGetCall { - c := &ProjectsLocationsReasoningEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsReasoningEnginesService) Query(name string, googlecloudaiplatformv1beta1queryreasoningenginerequest *GoogleCloudAiplatformV1beta1QueryReasoningEngineRequest) *ProjectsLocationsReasoningEnginesQueryCall { + c := &ProjectsLocationsReasoningEnginesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1beta1queryreasoningenginerequest = googlecloudaiplatformv1beta1queryreasoningenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsReasoningEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesGetCall { +func (c *ProjectsLocationsReasoningEnginesQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsReasoningEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReasoningEnginesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReasoningEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesGetCall { +func (c *ProjectsLocationsReasoningEnginesQueryCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesQueryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsReasoningEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsReasoningEnginesQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReasoningEnginesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsReasoningEnginesQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 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.reasoningEngines.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1ReasoningEngine.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 *ProjectsLocationsReasoningEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ReasoningEngine, 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1queryreasoningenginerequest) if err != nil { return nil, err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudAiplatformV1beta1ReasoningEngine{ - 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 -} - -type ProjectsLocationsReasoningEnginesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists reasoning engines in a location. -// -// - parent: The resource name of the Location to list the ReasoningEngines -// from. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsReasoningEnginesService) List(parent string) *ProjectsLocationsReasoningEnginesListCall { - c := &ProjectsLocationsReasoningEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. More -// detail in AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsReasoningEnginesListCall) Filter(filter string) *ProjectsLocationsReasoningEnginesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsReasoningEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsReasoningEnginesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsReasoningEnginesListCall) PageToken(pageToken string) *ProjectsLocationsReasoningEnginesListCall { - 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 -// details. -func (c *ProjectsLocationsReasoningEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsReasoningEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReasoningEnginesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReasoningEnginesListCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsReasoningEnginesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsReasoningEnginesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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}/reasoningEngines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:query") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.reasoningEngines.list" call. +// Do executes the "aiplatform.projects.locations.reasoningEngines.query" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse.ServerResponse.Head +// *GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse.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 *ProjectsLocationsReasoningEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse, 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 := &GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse{ - 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 -} - -// 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 *ProjectsLocationsReasoningEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsReasoningEnginesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a reasoning engine. -// -// - name: Identifier. The resource name of the ReasoningEngine. -func (r *ProjectsLocationsReasoningEnginesService) Patch(name string, googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine) *ProjectsLocationsReasoningEnginesPatchCall { - c := &ProjectsLocationsReasoningEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1beta1reasoningengine = googlecloudaiplatformv1beta1reasoningengine - return c -} - -// UpdateMask sets the optional parameter "updateMask": Mask specifying which -// fields to update. -func (c *ProjectsLocationsReasoningEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsReasoningEnginesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsReasoningEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReasoningEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsReasoningEnginesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsReasoningEnginesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1reasoningengine) - if err != nil { - return nil, err - } - 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("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.reasoningEngines.patch" call. -// 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 *ProjectsLocationsReasoningEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReasoningEnginesQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -106710,7 +107938,7 @@ func (c *ProjectsLocationsReasoningEnginesPatchCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -106723,60 +107951,60 @@ func (c *ProjectsLocationsReasoningEnginesPatchCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsReasoningEnginesQueryCall struct { - s *Service - name string - googlecloudaiplatformv1beta1queryreasoningenginerequest *GoogleCloudAiplatformV1beta1QueryReasoningEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReasoningEnginesStreamQueryCall struct { + s *Service + name string + googlecloudaiplatformv1beta1streamqueryreasoningenginerequest *GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Query: Queries using a reasoning engine. +// StreamQuery: Streams queries using a reasoning engine. // // - name: The name of the ReasoningEngine resource to use. Format: // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine // }`. -func (r *ProjectsLocationsReasoningEnginesService) Query(name string, googlecloudaiplatformv1beta1queryreasoningenginerequest *GoogleCloudAiplatformV1beta1QueryReasoningEngineRequest) *ProjectsLocationsReasoningEnginesQueryCall { - c := &ProjectsLocationsReasoningEnginesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsReasoningEnginesService) StreamQuery(name string, googlecloudaiplatformv1beta1streamqueryreasoningenginerequest *GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest) *ProjectsLocationsReasoningEnginesStreamQueryCall { + c := &ProjectsLocationsReasoningEnginesStreamQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1beta1queryreasoningenginerequest = googlecloudaiplatformv1beta1queryreasoningenginerequest + c.googlecloudaiplatformv1beta1streamqueryreasoningenginerequest = googlecloudaiplatformv1beta1streamqueryreasoningenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsReasoningEnginesQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesQueryCall { +func (c *ProjectsLocationsReasoningEnginesStreamQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesStreamQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReasoningEnginesQueryCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesQueryCall { +func (c *ProjectsLocationsReasoningEnginesStreamQueryCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesStreamQueryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsReasoningEnginesQueryCall) Header() http.Header { +func (c *ProjectsLocationsReasoningEnginesStreamQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReasoningEnginesQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReasoningEnginesStreamQueryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1queryreasoningenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1streamqueryreasoningenginerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:query") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:streamQuery") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -106789,13 +108017,13 @@ func (c *ProjectsLocationsReasoningEnginesQueryCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.reasoningEngines.query" call. +// Do executes the "aiplatform.projects.locations.reasoningEngines.streamQuery" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse.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 *ProjectsLocationsReasoningEnginesQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse, error) { +// *GoogleApiHttpBody.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 *ProjectsLocationsReasoningEnginesStreamQueryCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -106814,7 +108042,7 @@ func (c *ProjectsLocationsReasoningEnginesQueryCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -121314,6 +122542,13 @@ func (c *PublishersModelsListCall) LanguageCode(languageCode string) *Publishers return c } +// ListAllVersions sets the optional parameter "listAllVersions": List all +// publisher model versions if the flag is set to true. +func (c *PublishersModelsListCall) ListAllVersions(listAllVersions bool) *PublishersModelsListCall { + c.urlParams_.Set("listAllVersions", fmt.Sprint(listAllVersions)) + return c +} + // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index cd4665040f8..32418fc8944 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -472,15 +472,15 @@ } } }, - "authorizedViewSet": { + "authorizedViewSets": { "resources": { - "authorizedView": { + "authorizedViews": { "methods": { "calculateStats": { "description": "Gets conversation statistics.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizedViewSet/{authorizedViewSetId}/authorizedView/{authorizedViewId}:calculateStats", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizedViewSets/{authorizedViewSetsId}/authorizedViews/{authorizedViewsId}:calculateStats", "httpMethod": "GET", - "id": "contactcenterinsights.projects.locations.authorizedViewSet.authorizedView.calculateStats", + "id": "contactcenterinsights.projects.locations.authorizedViewSets.authorizedViews.calculateStats", "parameterOrder": [ "location" ], @@ -493,7 +493,7 @@ "location": { "description": "Required. The location of the conversations.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authorizedViewSet/[^/]+/authorizedView/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/authorizedViewSets/[^/]+/authorizedViews/[^/]+$", "required": true, "type": "string" } @@ -508,9 +508,9 @@ }, "queryMetrics": { "description": "Query metrics.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizedViewSet/{authorizedViewSetId}/authorizedView/{authorizedViewId}:queryMetrics", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizedViewSets/{authorizedViewSetsId}/authorizedViews/{authorizedViewsId}:queryMetrics", "httpMethod": "POST", - "id": "contactcenterinsights.projects.locations.authorizedViewSet.authorizedView.queryMetrics", + "id": "contactcenterinsights.projects.locations.authorizedViewSets.authorizedViews.queryMetrics", "parameterOrder": [ "location" ], @@ -518,7 +518,7 @@ "location": { "description": "Required. The location of the data. \"projects/{project}/locations/{location}\"", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authorizedViewSet/[^/]+/authorizedView/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/authorizedViewSets/[^/]+/authorizedViews/[^/]+$", "required": true, "type": "string" } @@ -2575,7 +2575,7 @@ } } }, - "revision": "20241119", + "revision": "20241204", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -3723,9 +3723,21 @@ "description": "A user-provided string indicating the outcome of the agent's segment of the call.", "type": "string" }, + "location": { + "description": "The agent's location.", + "type": "string" + }, "team": { - "description": "A user-specified string representing the agent's team.", + "deprecated": true, + "description": "A user-specified string representing the agent's team. Deprecated in favor of the `teams` field.", "type": "string" + }, + "teams": { + "description": "User-specified strings representing the agent's teams.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -7359,9 +7371,21 @@ "description": "A user-provided string indicating the outcome of the agent's segment of the call.", "type": "string" }, + "location": { + "description": "The agent's location.", + "type": "string" + }, "team": { - "description": "A user-specified string representing the agent's team.", + "deprecated": true, + "description": "A user-specified string representing the agent's team. Deprecated in favor of the `teams` field.", "type": "string" + }, + "teams": { + "description": "User-specified strings representing the agent's teams.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 756b11427ac..a2096a7471d 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -169,7 +169,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.AnalysisRules = NewProjectsLocationsAnalysisRulesService(s) - rs.AuthorizedViewSet = NewProjectsLocationsAuthorizedViewSetService(s) + rs.AuthorizedViewSets = NewProjectsLocationsAuthorizedViewSetsService(s) rs.Conversations = NewProjectsLocationsConversationsService(s) rs.EncryptionSpec = NewProjectsLocationsEncryptionSpecService(s) rs.Insightsdata = NewProjectsLocationsInsightsdataService(s) @@ -186,7 +186,7 @@ type ProjectsLocationsService struct { AnalysisRules *ProjectsLocationsAnalysisRulesService - AuthorizedViewSet *ProjectsLocationsAuthorizedViewSetService + AuthorizedViewSets *ProjectsLocationsAuthorizedViewSetsService Conversations *ProjectsLocationsConversationsService @@ -214,24 +214,24 @@ type ProjectsLocationsAnalysisRulesService struct { s *Service } -func NewProjectsLocationsAuthorizedViewSetService(s *Service) *ProjectsLocationsAuthorizedViewSetService { - rs := &ProjectsLocationsAuthorizedViewSetService{s: s} - rs.AuthorizedView = NewProjectsLocationsAuthorizedViewSetAuthorizedViewService(s) +func NewProjectsLocationsAuthorizedViewSetsService(s *Service) *ProjectsLocationsAuthorizedViewSetsService { + rs := &ProjectsLocationsAuthorizedViewSetsService{s: s} + rs.AuthorizedViews = NewProjectsLocationsAuthorizedViewSetsAuthorizedViewsService(s) return rs } -type ProjectsLocationsAuthorizedViewSetService struct { +type ProjectsLocationsAuthorizedViewSetsService struct { s *Service - AuthorizedView *ProjectsLocationsAuthorizedViewSetAuthorizedViewService + AuthorizedViews *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService } -func NewProjectsLocationsAuthorizedViewSetAuthorizedViewService(s *Service) *ProjectsLocationsAuthorizedViewSetAuthorizedViewService { - rs := &ProjectsLocationsAuthorizedViewSetAuthorizedViewService{s: s} +func NewProjectsLocationsAuthorizedViewSetsAuthorizedViewsService(s *Service) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService { + rs := &ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService{s: s} return rs } -type ProjectsLocationsAuthorizedViewSetAuthorizedViewService struct { +type ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService struct { s *Service } @@ -1665,8 +1665,13 @@ type GoogleCloudContactcenterinsightsV1ConversationQualityMetadataAgentInfo stru // DispositionCode: A user-provided string indicating the outcome of the // agent's segment of the call. DispositionCode string `json:"dispositionCode,omitempty"` - // Team: A user-specified string representing the agent's team. + // Location: The agent's location. + Location string `json:"location,omitempty"` + // Team: A user-specified string representing the agent's team. Deprecated in + // favor of the `teams` field. Team string `json:"team,omitempty"` + // Teams: User-specified strings representing the agent's teams. + Teams []string `json:"teams,omitempty"` // ForceSendFields is a list of field names (e.g. "AgentId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -6414,8 +6419,13 @@ type GoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadataAgentInf // DispositionCode: A user-provided string indicating the outcome of the // agent's segment of the call. DispositionCode string `json:"dispositionCode,omitempty"` - // Team: A user-specified string representing the agent's team. + // Location: The agent's location. + Location string `json:"location,omitempty"` + // Team: A user-specified string representing the agent's team. Deprecated in + // favor of the `teams` field. Team string `json:"team,omitempty"` + // Teams: User-specified strings representing the agent's teams. + Teams []string `json:"teams,omitempty"` // ForceSendFields is a list of field names (e.g. "AgentId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -10754,7 +10764,7 @@ func (c *ProjectsLocationsAnalysisRulesPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall struct { +type ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall struct { s *Service location string urlParams_ gensupport.URLParams @@ -10766,8 +10776,8 @@ type ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall struct { // CalculateStats: Gets conversation statistics. // // - location: The location of the conversations. -func (r *ProjectsLocationsAuthorizedViewSetAuthorizedViewService) CalculateStats(location string) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { - c := &ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService) CalculateStats(location string) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { + c := &ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.location = location return c } @@ -10775,7 +10785,7 @@ func (r *ProjectsLocationsAuthorizedViewSetAuthorizedViewService) CalculateStats // Filter sets the optional parameter "filter": A filter to reduce results to a // specific subset. This field is useful for getting statistics about // conversations with specific properties. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Filter(filter string) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Filter(filter string) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { c.urlParams_.Set("filter", filter) return c } @@ -10783,7 +10793,7 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Fil // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10791,27 +10801,27 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Fie // IfNoneMatch sets an 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. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Context(ctx context.Context) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Context(ctx context.Context) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Header() http.Header { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -10832,13 +10842,13 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "contactcenterinsights.projects.locations.authorizedViewSet.authorizedView.calculateStats" call. +// Do executes the "contactcenterinsights.projects.locations.authorizedViewSets.authorizedViews.calculateStats" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudContactcenterinsightsV1CalculateStatsResponse.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 *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContactcenterinsightsV1CalculateStatsResponse, error) { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContactcenterinsightsV1CalculateStatsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10870,7 +10880,7 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Do( return ret, nil } -type ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall struct { +type ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall struct { s *Service location string googlecloudcontactcenterinsightsv1querymetricsrequest *GoogleCloudContactcenterinsightsV1QueryMetricsRequest @@ -10883,8 +10893,8 @@ type ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall struct { // // - location: The location of the data. // "projects/{project}/locations/{location}". -func (r *ProjectsLocationsAuthorizedViewSetAuthorizedViewService) QueryMetrics(location string, googlecloudcontactcenterinsightsv1querymetricsrequest *GoogleCloudContactcenterinsightsV1QueryMetricsRequest) *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall { - c := &ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService) QueryMetrics(location string, googlecloudcontactcenterinsightsv1querymetricsrequest *GoogleCloudContactcenterinsightsV1QueryMetricsRequest) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall { + c := &ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.location = location c.googlecloudcontactcenterinsightsv1querymetricsrequest = googlecloudcontactcenterinsightsv1querymetricsrequest return c @@ -10893,27 +10903,27 @@ func (r *ProjectsLocationsAuthorizedViewSetAuthorizedViewService) QueryMetrics(l // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) Context(ctx context.Context) *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) Context(ctx context.Context) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) Header() http.Header { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontactcenterinsightsv1querymetricsrequest) @@ -10935,13 +10945,13 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "contactcenterinsights.projects.locations.authorizedViewSet.authorizedView.queryMetrics" call. +// Do executes the "contactcenterinsights.projects.locations.authorizedViewSets.authorizedViews.queryMetrics" call. // 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 *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { diff --git a/datacatalog/v1/datacatalog-api.json b/datacatalog/v1/datacatalog-api.json index dc2ca82ebe4..1bc3c2ec9e6 100644 --- a/datacatalog/v1/datacatalog-api.json +++ b/datacatalog/v1/datacatalog-api.json @@ -1217,7 +1217,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "datacatalog.projects.locations.operations.cancel", @@ -2285,7 +2285,7 @@ } } }, - "revision": "20241021", + "revision": "20241202", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index f15f336768e..ea93a6fa04a 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -8314,7 +8314,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 2e5c4853dcd..135bba9ba8f 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -1339,6 +1339,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "fetchSourceObjects": { + "description": "Retrieves objects from the source database that can be selected for data migration. This is applicable for the following migrations: 1. PostgreSQL to Cloud SQL for PostgreSQL 2. PostgreSQL to AlloyDB for PostgreSQL.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:fetchSourceObjects", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.fetchSourceObjects", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name for the migration job for which source objects should be returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:fetchSourceObjects", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "generateSshScript": { "description": "Generate a SSH configuration script to configure the reverse SSH connectivity.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:generateSshScript", @@ -1764,6 +1789,31 @@ "resources": { "objects": { "methods": { + "get": { + "description": "Use this method to get details about a migration job object.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects/{objectsId}", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.objects.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the migration job object resource to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+/objects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "MigrationJobObject" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects/{objectsId}:getIamPolicy", @@ -1795,6 +1845,70 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Use this method to list the objects of a specific migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.objects.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of objects to return. Default is 50. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token received from a previous `ListMigrationJObObjectsRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMigrationJobObjectsRequest` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent migration job that owns the collection of objects.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/objects", + "response": { + "$ref": "ListMigrationJobObjectsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "lookup": { + "description": "Use this method to look up a migration job object by its source object identifier.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects:lookup", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.objects.lookup", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent migration job that owns the collection of objects.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/objects:lookup", + "request": { + "$ref": "LookupMigrationJobObjectRequest" + }, + "response": { + "$ref": "MigrationJobObject" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects/{objectsId}:setIamPolicy", @@ -1858,7 +1972,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "datamigration.projects.locations.operations.cancel", @@ -2218,7 +2332,7 @@ } } }, - "revision": "20241109", + "revision": "20241202", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -3986,7 +4100,7 @@ "type": "string" }, "requestedCancellation": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "readOnly": true, "type": "boolean" }, @@ -4249,6 +4363,24 @@ }, "type": "object" }, + "ListMigrationJobObjectsResponse": { + "description": "Response containing the objects for a migration job.", + "id": "ListMigrationJobObjectsResponse", + "properties": { + "migrationJobObjects": { + "description": "List of migration job objects.", + "items": { + "$ref": "MigrationJobObject" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page.", + "type": "string" + } + }, + "type": "object" + }, "ListMigrationJobsResponse": { "description": "Response message for 'ListMigrationJobs' request.", "id": "ListMigrationJobsResponse", @@ -4372,6 +4504,17 @@ "properties": {}, "type": "object" }, + "LookupMigrationJobObjectRequest": { + "description": "Request for looking up a specific migration job object by its source object identifier.", + "id": "LookupMigrationJobObjectRequest", + "properties": { + "sourceObjectIdentifier": { + "$ref": "SourceObjectIdentifier", + "description": "Required. The source object identifier which maps to the migration job object." + } + }, + "type": "object" + }, "MachineConfig": { "description": "MachineConfig describes the configuration of a machine.", "id": "MachineConfig", @@ -4561,6 +4704,13 @@ "description": "Custom engine specific features.", "type": "object" }, + "indices": { + "description": "View indices.", + "items": { + "$ref": "IndexEntity" + }, + "type": "array" + }, "sqlCode": { "description": "The SQL code which creates the view.", "type": "string" @@ -4652,6 +4802,10 @@ "description": "The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.", "type": "string" }, + "objectsConfig": { + "$ref": "MigrationJobObjectsConfig", + "description": "Optional. The objects that need to be migrated." + }, "oracleToPostgresConfig": { "$ref": "OracleToPostgresConfig", "description": "Configuration for heterogeneous **Oracle to Cloud SQL for PostgreSQL** and **Oracle to AlloyDB for PostgreSQL** migrations." @@ -4770,6 +4924,100 @@ }, "type": "object" }, + "MigrationJobObject": { + "description": "A specific Migration Job Object (e.g. a specifc DB Table)", + "id": "MigrationJobObject", + "properties": { + "createTime": { + "description": "Output only. The creation time of the migration job object.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "Output only. The error details in case of failure.", + "readOnly": true + }, + "name": { + "description": "The object's name.", + "type": "string" + }, + "phase": { + "description": "Output only. The phase of the migration job object.", + "enum": [ + "PHASE_UNSPECIFIED", + "FULL_DUMP", + "CDC", + "READY_FOR_PROMOTE", + "PROMOTE_IN_PROGRESS", + "PROMOTED", + "DIFF_BACKUP" + ], + "enumDescriptions": [ + "The phase of the migration job is unknown.", + "The migration job object is in the full dump phase.", + "The migration job object is in CDC phase.", + "The migration job object is ready to be promoted.", + "The migration job object is in running the promote phase.", + "The migration job is promoted.", + "The migration job object is in the differential backup phase." + ], + "readOnly": true, + "type": "string" + }, + "sourceObject": { + "$ref": "SourceObjectIdentifier", + "description": "The object identifier in the data source." + }, + "state": { + "description": "The state of the migration job object.", + "enum": [ + "STATE_UNSPECIFIED", + "NOT_STARTED", + "RUNNING", + "STOPPING", + "STOPPED", + "RESTARTING", + "FAILED", + "REMOVING", + "NOT_SELECTED", + "COMPLETED" + ], + "enumDescriptions": [ + "The state of the migration job object is unknown.", + "The migration job object is not started.", + "The migration job object is running.", + "The migration job object is being stopped.", + "The migration job object is currently stopped.", + "The migration job object is restarting.", + "The migration job object failed.", + "The migration job object is deleting.", + "The migration job object is not selected for migration.", + "The migration job object is completed." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The last update time of the migration job object.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MigrationJobObjectsConfig": { + "description": "Configuration for the objects to be migrated.", + "id": "MigrationJobObjectsConfig", + "properties": { + "sourceObjectsConfig": { + "$ref": "SourceObjectsConfig", + "description": "The list of the migration job objects." + } + }, + "type": "object" + }, "MigrationJobVerificationError": { "description": "Error message of a verification Migration job.", "id": "MigrationJobVerificationError", @@ -5479,13 +5727,22 @@ "PromoteMigrationJobRequest": { "description": "Request message for 'PromoteMigrationJob' request.", "id": "PromoteMigrationJobRequest", - "properties": {}, + "properties": { + "objectsFilter": { + "$ref": "MigrationJobObjectsConfig", + "description": "Optional. The object filter to apply to the migration job." + } + }, "type": "object" }, "RestartMigrationJobRequest": { "description": "Request message for 'RestartMigrationJob' request.", "id": "RestartMigrationJobRequest", "properties": { + "objectsFilter": { + "$ref": "MigrationJobObjectsConfig", + "description": "Optional. The object filter to apply to the migration job." + }, "skipValidation": { "description": "Optional. Restart the migration job without running prior configuration verification. Defaults to `false`.", "type": "boolean" @@ -5847,6 +6104,68 @@ }, "type": "object" }, + "SourceObjectConfig": { + "description": "Config for a single migration job object.", + "id": "SourceObjectConfig", + "properties": { + "objectIdentifier": { + "$ref": "SourceObjectIdentifier", + "description": "The object identifier." + } + }, + "type": "object" + }, + "SourceObjectIdentifier": { + "description": "An identifier for the Migration Job Object.", + "id": "SourceObjectIdentifier", + "properties": { + "database": { + "description": "The database name. This will be required only if the object uses a database name as part of its unique identifier.", + "type": "string" + }, + "type": { + "description": "Required. The type of the migration job object.", + "enum": [ + "MIGRATION_JOB_OBJECT_TYPE_UNSPECIFIED", + "DATABASE" + ], + "enumDescriptions": [ + "The type of the migration job object is unknown.", + "The migration job object is a database." + ], + "type": "string" + } + }, + "type": "object" + }, + "SourceObjectsConfig": { + "description": "List of configurations for the source objects to be migrated.", + "id": "SourceObjectsConfig", + "properties": { + "objectConfigs": { + "description": "The list of the objects to be migrated.", + "items": { + "$ref": "SourceObjectConfig" + }, + "type": "array" + }, + "objectsSelectionType": { + "description": "Optional. The objects selection type of the migration job.", + "enum": [ + "OBJECTS_SELECTION_TYPE_UNSPECIFIED", + "ALL_OBJECTS", + "SPECIFIED_OBJECTS" + ], + "enumDescriptions": [ + "The type of the objects selection is unknown, indicating that the migration job is at instance level.", + "Migrate all of the objects.", + "Migrate specific objects." + ], + "type": "string" + } + }, + "type": "object" + }, "SourceSqlChange": { "description": "Options to configure rule type SourceSqlChange. The rule is used to alter the sql code for database entities. The rule filter field can refer to one entity. The rule scope can be: StoredProcedure, Function, Trigger, View", "id": "SourceSqlChange", @@ -6022,15 +6341,15 @@ "id": "SqlServerEncryptionOptions", "properties": { "certPath": { - "description": "Required. Path to certificate.", + "description": "Required. Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", "type": "string" }, "pvkPassword": { - "description": "Required. Input only. Private key password.", + "description": "Required. Input only. Password that encrypts the private key.", "type": "string" }, "pvkPath": { - "description": "Required. Path to certificate private key.", + "description": "Required. Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", "type": "string" } }, diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 9ba428f5ed2..d603a2a8153 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -2202,8 +2202,8 @@ type GoogleCloudClouddmsV1OperationMetadata struct { EndTime string `json:"endTime,omitempty"` // RequestedCancellation: Output only. Identifies whether the user has // requested cancellation of the operation. Operations that have successfully - // been cancelled have Operation.error value with a google.rpc.Status.code of - // 1, corresponding to `Code.CANCELLED`. + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. RequestedCancellation bool `json:"requestedCancellation,omitempty"` // StatusMessage: Output only. Human-readable status of the operation, if any. StatusMessage string `json:"statusMessage,omitempty"` @@ -2517,6 +2517,35 @@ func (s ListMappingRulesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListMigrationJobObjectsResponse: Response containing the objects for a +// migration job. +type ListMigrationJobObjectsResponse struct { + // MigrationJobObjects: List of migration job objects. + MigrationJobObjects []*MigrationJobObject `json:"migrationJobObjects,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. + 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. "MigrationJobObjects") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationJobObjects") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListMigrationJobObjectsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMigrationJobObjectsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListMigrationJobsResponse: Response message for 'ListMigrationJobs' request. type ListMigrationJobsResponse struct { // MigrationJobs: The list of migration jobs objects. @@ -2673,6 +2702,30 @@ func (s LogFileDirectories) MarshalJSON() ([]byte, error) { type LogMiner struct { } +// LookupMigrationJobObjectRequest: Request for looking up a specific migration +// job object by its source object identifier. +type LookupMigrationJobObjectRequest struct { + // SourceObjectIdentifier: Required. The source object identifier which maps to + // the migration job object. + SourceObjectIdentifier *SourceObjectIdentifier `json:"sourceObjectIdentifier,omitempty"` + // ForceSendFields is a list of field names (e.g. "SourceObjectIdentifier") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SourceObjectIdentifier") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LookupMigrationJobObjectRequest) MarshalJSON() ([]byte, error) { + type NoMethod LookupMigrationJobObjectRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MachineConfig: MachineConfig describes the configuration of a machine. type MachineConfig struct { // CpuCount: The number of CPU's in the VM instance. @@ -2845,6 +2898,8 @@ func (s MappingRuleFilter) MarshalJSON() ([]byte, error) { type MaterializedViewEntity struct { // CustomFeatures: Custom engine specific features. CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + // Indices: View indices. + Indices []*IndexEntity `json:"indices,omitempty"` // SqlCode: The SQL code which creates the view. SqlCode string `json:"sqlCode,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomFeatures") to @@ -2929,6 +2984,8 @@ type MigrationJob struct { // Name: The name (URI) of this migration job resource, in the form of: // projects/{project}/locations/{location}/migrationJobs/{migrationJob}. Name string `json:"name,omitempty"` + // ObjectsConfig: Optional. The objects that need to be migrated. + ObjectsConfig *MigrationJobObjectsConfig `json:"objectsConfig,omitempty"` // OracleToPostgresConfig: Configuration for heterogeneous **Oracle to Cloud // SQL for PostgreSQL** and **Oracle to AlloyDB for PostgreSQL** migrations. OracleToPostgresConfig *OracleToPostgresConfig `json:"oracleToPostgresConfig,omitempty"` @@ -3016,6 +3073,89 @@ func (s MigrationJob) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MigrationJobObject: A specific Migration Job Object (e.g. a specifc DB +// Table) +type MigrationJobObject struct { + // CreateTime: Output only. The creation time of the migration job object. + CreateTime string `json:"createTime,omitempty"` + // Error: Output only. The error details in case of failure. + Error *Status `json:"error,omitempty"` + // Name: The object's name. + Name string `json:"name,omitempty"` + // Phase: Output only. The phase of the migration job object. + // + // Possible values: + // "PHASE_UNSPECIFIED" - The phase of the migration job is unknown. + // "FULL_DUMP" - The migration job object is in the full dump phase. + // "CDC" - The migration job object is in CDC phase. + // "READY_FOR_PROMOTE" - The migration job object is ready to be promoted. + // "PROMOTE_IN_PROGRESS" - The migration job object is in running the promote + // phase. + // "PROMOTED" - The migration job is promoted. + // "DIFF_BACKUP" - The migration job object is in the differential backup + // phase. + Phase string `json:"phase,omitempty"` + // SourceObject: The object identifier in the data source. + SourceObject *SourceObjectIdentifier `json:"sourceObject,omitempty"` + // State: The state of the migration job object. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the migration job object is unknown. + // "NOT_STARTED" - The migration job object is not started. + // "RUNNING" - The migration job object is running. + // "STOPPING" - The migration job object is being stopped. + // "STOPPED" - The migration job object is currently stopped. + // "RESTARTING" - The migration job object is restarting. + // "FAILED" - The migration job object failed. + // "REMOVING" - The migration job object is deleting. + // "NOT_SELECTED" - The migration job object is not selected for migration. + // "COMPLETED" - The migration job object is completed. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The last update time of the migration job object. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MigrationJobObject) MarshalJSON() ([]byte, error) { + type NoMethod MigrationJobObject + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MigrationJobObjectsConfig: Configuration for the objects to be migrated. +type MigrationJobObjectsConfig struct { + // SourceObjectsConfig: The list of the migration job objects. + SourceObjectsConfig *SourceObjectsConfig `json:"sourceObjectsConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "SourceObjectsConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SourceObjectsConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MigrationJobObjectsConfig) MarshalJSON() ([]byte, error) { + type NoMethod MigrationJobObjectsConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MigrationJobVerificationError: Error message of a verification Migration // job. type MigrationJobVerificationError struct { @@ -3857,23 +3997,43 @@ func (s PrivateServiceConnectConnectivity) MarshalJSON() ([]byte, error) { // PromoteMigrationJobRequest: Request message for 'PromoteMigrationJob' // request. type PromoteMigrationJobRequest struct { + // ObjectsFilter: Optional. The object filter to apply to the migration job. + ObjectsFilter *MigrationJobObjectsConfig `json:"objectsFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "ObjectsFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ObjectsFilter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PromoteMigrationJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod PromoteMigrationJobRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // RestartMigrationJobRequest: Request message for 'RestartMigrationJob' // request. type RestartMigrationJobRequest struct { + // ObjectsFilter: Optional. The object filter to apply to the migration job. + ObjectsFilter *MigrationJobObjectsConfig `json:"objectsFilter,omitempty"` // SkipValidation: Optional. Restart the migration job without running prior // configuration verification. Defaults to `false`. SkipValidation bool `json:"skipValidation,omitempty"` - // ForceSendFields is a list of field names (e.g. "SkipValidation") to + // ForceSendFields is a list of field names (e.g. "ObjectsFilter") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SkipValidation") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ObjectsFilter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4353,6 +4513,90 @@ func (s SourceNumericFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SourceObjectConfig: Config for a single migration job object. +type SourceObjectConfig struct { + // ObjectIdentifier: The object identifier. + ObjectIdentifier *SourceObjectIdentifier `json:"objectIdentifier,omitempty"` + // ForceSendFields is a list of field names (e.g. "ObjectIdentifier") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ObjectIdentifier") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceObjectConfig) MarshalJSON() ([]byte, error) { + type NoMethod SourceObjectConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SourceObjectIdentifier: An identifier for the Migration Job Object. +type SourceObjectIdentifier struct { + // Database: The database name. This will be required only if the object uses a + // database name as part of its unique identifier. + Database string `json:"database,omitempty"` + // Type: Required. The type of the migration job object. + // + // Possible values: + // "MIGRATION_JOB_OBJECT_TYPE_UNSPECIFIED" - The type of the migration job + // object is unknown. + // "DATABASE" - The migration job object is a database. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Database") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Database") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceObjectIdentifier) MarshalJSON() ([]byte, error) { + type NoMethod SourceObjectIdentifier + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SourceObjectsConfig: List of configurations for the source objects to be +// migrated. +type SourceObjectsConfig struct { + // ObjectConfigs: The list of the objects to be migrated. + ObjectConfigs []*SourceObjectConfig `json:"objectConfigs,omitempty"` + // ObjectsSelectionType: Optional. The objects selection type of the migration + // job. + // + // Possible values: + // "OBJECTS_SELECTION_TYPE_UNSPECIFIED" - The type of the objects selection + // is unknown, indicating that the migration job is at instance level. + // "ALL_OBJECTS" - Migrate all of the objects. + // "SPECIFIED_OBJECTS" - Migrate specific objects. + ObjectsSelectionType string `json:"objectsSelectionType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ObjectConfigs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ObjectConfigs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceObjectsConfig) MarshalJSON() ([]byte, error) { + type NoMethod SourceObjectsConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SourceSqlChange: Options to configure rule type SourceSqlChange. The rule is // used to alter the sql code for database entities. The rule filter field can // refer to one entity. The rule scope can be: StoredProcedure, Function, @@ -4588,11 +4832,15 @@ func (s SqlServerDatabaseBackup) MarshalJSON() ([]byte, error) { // SqlServerEncryptionOptions: Encryption settings for the SQL Server database. type SqlServerEncryptionOptions struct { - // CertPath: Required. Path to certificate. + // CertPath: Required. Path to the Certificate (.cer) in Cloud Storage, in the + // form `gs://bucketName/fileName`. The instance must have write permissions to + // the bucket and read access to the file. CertPath string `json:"certPath,omitempty"` - // PvkPassword: Required. Input only. Private key password. + // PvkPassword: Required. Input only. Password that encrypts the private key. PvkPassword string `json:"pvkPassword,omitempty"` - // PvkPath: Required. Path to certificate private key. + // PvkPath: Required. Path to the Certificate Private Key (.pvk) in Cloud + // Storage, in the form `gs://bucketName/fileName`. The instance must have + // write permissions to the bucket and read access to the file. PvkPath string `json:"pvkPath,omitempty"` // ForceSendFields is a list of field names (e.g. "CertPath") to // unconditionally include in API requests. By default, fields with empty or @@ -9573,6 +9821,117 @@ func (c *ProjectsLocationsMigrationJobsDemoteDestinationCall) Do(opts ...googlea return ret, nil } +type ProjectsLocationsMigrationJobsFetchSourceObjectsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FetchSourceObjects: Retrieves objects from the source database that can be +// selected for data migration. This is applicable for the following +// migrations: 1. PostgreSQL to Cloud SQL for PostgreSQL 2. PostgreSQL to +// AlloyDB for PostgreSQL. +// +// - name: The resource name for the migration job for which source objects +// should be returned. +func (r *ProjectsLocationsMigrationJobsService) FetchSourceObjects(name string) *ProjectsLocationsMigrationJobsFetchSourceObjectsCall { + c := &ProjectsLocationsMigrationJobsFetchSourceObjectsCall{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 +// details. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsFetchSourceObjectsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsFetchSourceObjectsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsFetchSourceObjectsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+name}:fetchSourceObjects") + 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 "datamigration.projects.locations.migrationJobs.fetchSourceObjects" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsMigrationJobsGenerateSshScriptCall struct { s *Service migrationJob string @@ -11128,32 +11487,140 @@ func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall struct { +type ProjectsLocationsMigrationJobsObjectsGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Get: Use this method to get details about a migration job object. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsMigrationJobsObjectsService) GetIamPolicy(resource string) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { - c := &ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the migration job object resource to get. +func (r *ProjectsLocationsMigrationJobsObjectsService) Get(name string) *ProjectsLocationsMigrationJobsObjectsGetCall { + c := &ProjectsLocationsMigrationJobsObjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsObjectsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+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 "datamigration.projects.locations.migrationJobs.objects.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *MigrationJobObject.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 *ProjectsLocationsMigrationJobsObjectsGetCall) Do(opts ...googleapi.CallOption) (*MigrationJobObject, 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 := &MigrationJobObject{ + 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 +} + +type ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsMigrationJobsObjectsService) GetIamPolicy(resource string) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { + c := &ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no // conditional role bindings may specify any valid value or leave the field // unset. The policy in the response might use the policy version that you // specified, or it might use a lower policy version. For example, if you @@ -11255,6 +11722,256 @@ func (c *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) Do(opts ...googl return ret, nil } +type ProjectsLocationsMigrationJobsObjectsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Use this method to list the objects of a specific migration job. +// +// - parent: The parent migration job that owns the collection of objects. +func (r *ProjectsLocationsMigrationJobsObjectsService) List(parent string) *ProjectsLocationsMigrationJobsObjectsListCall { + c := &ProjectsLocationsMigrationJobsObjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of objects +// to return. Default is 50. The maximum value is 1000; values above 1000 will +// be coerced to 1000. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) PageSize(pageSize int64) *ProjectsLocationsMigrationJobsObjectsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous `ListMigrationJObObjectsRequest` call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided to +// `ListMigrationJobObjectsRequest` must match the call that provided the page +// token. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) PageToken(pageToken string) *ProjectsLocationsMigrationJobsObjectsListCall { + 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 +// details. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsObjectsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1/{+parent}/objects") + 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 "datamigration.projects.locations.migrationJobs.objects.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListMigrationJobObjectsResponse.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 *ProjectsLocationsMigrationJobsObjectsListCall) Do(opts ...googleapi.CallOption) (*ListMigrationJobObjectsResponse, 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 := &ListMigrationJobObjectsResponse{ + 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 +} + +// 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 *ProjectsLocationsMigrationJobsObjectsListCall) Pages(ctx context.Context, f func(*ListMigrationJobObjectsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsMigrationJobsObjectsLookupCall struct { + s *Service + parent string + lookupmigrationjobobjectrequest *LookupMigrationJobObjectRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Lookup: Use this method to look up a migration job object by its source +// object identifier. +// +// - parent: The parent migration job that owns the collection of objects. +func (r *ProjectsLocationsMigrationJobsObjectsService) Lookup(parent string, lookupmigrationjobobjectrequest *LookupMigrationJobObjectRequest) *ProjectsLocationsMigrationJobsObjectsLookupCall { + c := &ProjectsLocationsMigrationJobsObjectsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.lookupmigrationjobobjectrequest = lookupmigrationjobobjectrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsLookupCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsLookupCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookupmigrationjobobjectrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/objects:lookup") + 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 "datamigration.projects.locations.migrationJobs.objects.lookup" call. +// Any non-2xx status code is an error. Response headers are in either +// *MigrationJobObject.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 *ProjectsLocationsMigrationJobsObjectsLookupCall) Do(opts ...googleapi.CallOption) (*MigrationJobObject, 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 := &MigrationJobObject{ + 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 +} + type ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall struct { s *Service resource string @@ -11485,7 +12202,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 86b662e15b6..02f0d138268 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -1967,7 +1967,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -3593,7 +3593,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -5366,7 +5366,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -6341,7 +6341,7 @@ } } }, - "revision": "20241205", + "revision": "20241206", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -6851,13 +6851,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, @@ -12928,13 +12930,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, @@ -15281,7 +15285,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "type": "string" }, "pageSize": { diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index b962aa081fd..4a3a2d119c4 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -1656,6 +1656,7 @@ type GoogleCloudDiscoveryengineV1Answer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1AnswerStep `json:"steps,omitempty"` @@ -10354,6 +10355,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1alphaAnswerStep `json:"steps,omitempty"` @@ -13539,8 +13541,9 @@ type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { Filter string `json:"filter,omitempty"` // OrderBy: A comma-separated list of fields to order by, sorted in ascending // order. Use "desc" after a field name for descending. Supported fields: * - // `update_time` * `create_time` * `session_name` Example: "update_time desc" - // "create_time" + // `update_time` * `create_time` * `session_name` * `is_pinned` Example: * + // "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list + // sessions by is_pinned first, then by update_time. OrderBy string `json:"orderBy,omitempty"` // PageSize: Maximum number of results to return. If unspecified, defaults to // 50. Max allowed value is 1000. @@ -27115,7 +27118,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter s // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -33120,7 +33125,9 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter stri // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -39625,7 +39632,9 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *Pro // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index f2b363cd040..23e27974a41 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -2522,7 +2522,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -4435,7 +4435,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -6482,7 +6482,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -8156,7 +8156,7 @@ } } }, - "revision": "20241205", + "revision": "20241206", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -10935,13 +10935,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, @@ -15566,7 +15568,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "type": "string" }, "pageSize": { diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 91fe69cbaf3..2713f2476db 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -4917,6 +4917,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1alphaAnswerStep `json:"steps,omitempty"` @@ -11500,8 +11501,9 @@ type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { Filter string `json:"filter,omitempty"` // OrderBy: A comma-separated list of fields to order by, sorted in ascending // order. Use "desc" after a field name for descending. Supported fields: * - // `update_time` * `create_time` * `session_name` Example: "update_time desc" - // "create_time" + // `update_time` * `create_time` * `session_name` * `is_pinned` Example: * + // "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list + // sessions by is_pinned first, then by update_time. OrderBy string `json:"orderBy,omitempty"` // PageSize: Maximum number of results to return. If unspecified, defaults to // 50. Max allowed value is 1000. @@ -29978,7 +29980,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter s // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -37081,7 +37085,9 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter stri // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -44595,7 +44601,9 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *Pro // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 8258b95e126..e32b7048395 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -2060,7 +2060,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -3920,7 +3920,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -5786,7 +5786,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -7354,7 +7354,7 @@ } } }, - "revision": "20241205", + "revision": "20241206", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -9872,13 +9872,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, @@ -12225,7 +12227,7 @@ "type": "string" }, "orderBy": { - "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "type": "string" }, "pageSize": { @@ -14339,13 +14341,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 9f263cac975..36a615c0eb5 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -4485,6 +4485,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1alphaAnswerStep `json:"steps,omitempty"` @@ -7670,8 +7671,9 @@ type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { Filter string `json:"filter,omitempty"` // OrderBy: A comma-separated list of fields to order by, sorted in ascending // order. Use "desc" after a field name for descending. Supported fields: * - // `update_time` * `create_time` * `session_name` Example: "update_time desc" - // "create_time" + // `update_time` * `create_time` * `session_name` * `is_pinned` Example: * + // "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list + // sessions by is_pinned first, then by update_time. OrderBy string `json:"orderBy,omitempty"` // PageSize: Maximum number of results to return. If unspecified, defaults to // 50. Max allowed value is 1000. @@ -10637,6 +10639,7 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1betaAnswerStep `json:"steps,omitempty"` @@ -28199,7 +28202,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter s // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -35088,7 +35093,9 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter stri // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -41960,7 +41967,9 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *Pro // OrderBy sets the optional parameter "orderBy": A comma-separated list of // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index 285cb4beabb..d39534b5768 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -1684,7 +1684,7 @@ } } }, - "revision": "20240709", + "revision": "20241203", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -3023,7 +3023,7 @@ "type": "string" }, "requestedCancellation": { - "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", "readOnly": true, "type": "boolean" }, @@ -3166,7 +3166,7 @@ "type": "object" }, "RestoreServiceRequest": { - "description": "Request message for DataprocMetastore.Restore.", + "description": "Request message for DataprocMetastore.RestoreService.", "id": "RestoreServiceRequest", "properties": { "backup": { diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index 88b915477a6..352fe6830ed 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -2003,8 +2003,8 @@ type OperationMetadata struct { EndTime string `json:"endTime,omitempty"` // RequestedCancellation: Output only. Identifies whether the caller has // requested cancellation of the operation. Operations that have successfully - // been cancelled have Operation.error value with a google.rpc.Status.code of - // 1, corresponding to Code.CANCELLED. + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. RequestedCancellation bool `json:"requestedCancellation,omitempty"` // StatusMessage: Output only. Human-readable status of the operation, if any. StatusMessage string `json:"statusMessage,omitempty"` @@ -2220,7 +2220,7 @@ func (s Restore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RestoreServiceRequest: Request message for DataprocMetastore.Restore. +// RestoreServiceRequest: Request message for DataprocMetastore.RestoreService. type RestoreServiceRequest struct { // Backup: Optional. The relative resource name of the metastore service backup // to restore from, in the following diff --git a/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index ff69ee57cfe..8c976108a52 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1796,7 +1796,7 @@ } } }, - "revision": "20240709", + "revision": "20241203", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -3232,7 +3232,7 @@ "type": "string" }, "requestedCancellation": { - "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", "readOnly": true, "type": "boolean" }, @@ -3397,7 +3397,7 @@ "type": "object" }, "RestoreServiceRequest": { - "description": "Request message for DataprocMetastore.Restore.", + "description": "Request message for DataprocMetastore.RestoreService.", "id": "RestoreServiceRequest", "properties": { "backup": { diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index 4ad857d7b6f..274af995d52 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -2163,8 +2163,8 @@ type OperationMetadata struct { EndTime string `json:"endTime,omitempty"` // RequestedCancellation: Output only. Identifies whether the caller has // requested cancellation of the operation. Operations that have successfully - // been cancelled have Operation.error value with a google.rpc.Status.code of - // 1, corresponding to Code.CANCELLED. + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. RequestedCancellation bool `json:"requestedCancellation,omitempty"` // StatusMessage: Output only. Human-readable status of the operation, if any. StatusMessage string `json:"statusMessage,omitempty"` @@ -2430,7 +2430,7 @@ func (s Restore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RestoreServiceRequest: Request message for DataprocMetastore.Restore. +// RestoreServiceRequest: Request message for DataprocMetastore.RestoreService. type RestoreServiceRequest struct { // Backup: Optional. The relative resource name of the metastore service backup // to restore from, in the following diff --git a/metastore/v2alpha/metastore-api.json b/metastore/v2alpha/metastore-api.json new file mode 100644 index 00000000000..05153aa7600 --- /dev/null +++ b/metastore/v2alpha/metastore-api.json @@ -0,0 +1,2313 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://metastore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Dataproc Metastore", + "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "metastore:v2alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://metastore.mtls.googleapis.com/", + "name": "metastore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "services": { + "methods": { + "alterLocation": { + "description": "Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterLocation", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterLocation", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:alterLocation", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "alterTableProperties": { + "description": "Alter metadata table properties.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterTableProperties", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterTableProperties", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the Dataproc Metastore service that's being used to mutate metadata table properties, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:alterTableProperties", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "cancelMigration": { + "description": "Cancels the ongoing Managed Migration process.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:cancelMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.cancelMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to cancel the ongoing migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:cancelMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaCancelMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "completeMigration": { + "description": "Completes the managed migration process. The Dataproc Metastore service will switch to using its own backend database after successful migration.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:completeMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.completeMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to complete the migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:completeMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaCompleteMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a metastore service in a project and location.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "serviceId": { + "description": "Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+parent}/services", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaService" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportMetadata": { + "description": "Exports metadata from a service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:exportMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.exportMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:exportMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaExportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importMetadata": { + "description": "Imports Metadata into a Dataproc Metastore service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:importMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.importMetadata", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service to run import, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}:importMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaImportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists services in a project and location.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/services", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "moveTableToDatabase": { + "description": "Move a table to another database.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:moveTableToDatabase", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.moveTableToDatabase", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:moveTableToDatabase", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaService" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "queryMetadata": { + "description": "Query Dataproc Metastore metadata.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.queryMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to query metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:queryMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaQueryMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeIamPolicy": { + "description": "Removes the attached IAM policies for a resource", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/{servicesId1}:removeIamPolicy", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.removeIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "Required. The relative resource name of the dataplane resource to remove IAM policy, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id} or projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/.*$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+resource}:removeIamPolicy", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest" + }, + "response": { + "$ref": "GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a service from a backup.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:restore", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.restore", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run restore, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:restore", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaRestoreServiceRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "startMigration": { + "description": "Starts the Managed Migration process.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:startMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.startMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to start migrating to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:startMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaStartMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new backup in a given project and location.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID of the backup, which is used as the final component of the backup's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service in which to create a backup of the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+parent}/backups", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaBackup" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single backup.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single backup.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaBackup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists backups in a service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose backups to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/backups", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "migrationExecutions": { + "methods": { + "delete": { + "description": "Deletes a single migration execution.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.migrationExecutions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single migration execution.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migration execution to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaMigrationExecution" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists migration executions on a service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of migration executions to return. The response may contain less than the maximum number. If unspecified, no more than 500 migration executions are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListMigrationExecutions call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListMigrationExecutions must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose migration executions to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/migrationExecutions", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20241203", + "rootUrl": "https://metastore.googleapis.com/", + "schemas": { + "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1CustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1CustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1ErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1ErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1HiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1HiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1LocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1LocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1CustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1MultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1HiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1MoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1MoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1MultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1MultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1OperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1QueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1QueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1alphaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1alphaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1alphaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1alphaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1betaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1betaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1betaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1betaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1betaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1betaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest": { + "description": "Request message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest", + "properties": { + "locationUri": { + "description": "Required. The new location URI for the metadata resource.", + "type": "string" + }, + "resourceName": { + "description": "Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest": { + "description": "Request message for DataprocMetastore.AlterTableProperties.", + "id": "GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest", + "properties": { + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that describes the desired values to mutate. If update_mask is empty, the properties will not update. Otherwise, the properties only alters the value whose associated paths exist in the update mask", + "type": "object" + }, + "tableName": { + "description": "Required. The name of the table containing the properties you're altering in the following format.databases/{database_id}/tables/{table_id}", + "type": "string" + }, + "updateMask": { + "description": "A field mask that specifies the metadata table properties that are overwritten by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.For example, given the target properties: properties { a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if the field mask is:paths: \"properties.b\", \"properties.c\"then the result will be: properties { a: 1 b: 3 c: 4 } ", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaAutoscalingConfig": { + "description": "Represents the autoscaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2alphaAutoscalingConfig", + "properties": { + "autoscalingEnabled": { + "description": "Optional. Whether or not autoscaling is enabled for this service.", + "type": "boolean" + }, + "autoscalingFactor": { + "description": "Output only. The scaling factor of a service with autoscaling enabled.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "limitConfig": { + "$ref": "GoogleCloudMetastoreV2alphaLimitConfig", + "description": "Optional. The LimitConfig of the service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig": { + "description": "Configuration information for the auxiliary service versions.", + "id": "GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig", + "properties": { + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.", + "type": "object" + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the auxiliary metastore service, includes version and region data.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "version": { + "description": "The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaBackup": { + "description": "The details of a backup resource.", + "id": "GoogleCloudMetastoreV2alphaBackup", + "properties": { + "createTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the backup.", + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the backup finished creating.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "type": "string" + }, + "restoringServices": { + "description": "Output only. Services that are restoring from the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "serviceRevision": { + "$ref": "GoogleCloudMetastoreV2alphaService", + "description": "Output only. The revision of the service at the time of backup.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "DELETING", + "ACTIVE", + "FAILED", + "RESTORING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is being created.", + "The backup is being deleted.", + "The backup is active and ready to use.", + "The backup failed.", + "The backup is being restored." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCancelMigrationRequest": { + "description": "Request message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV2alphaCancelMigrationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCdcConfig": { + "description": "Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore.", + "id": "GoogleCloudMetastoreV2alphaCdcConfig", + "properties": { + "bucket": { + "description": "Optional. The bucket to write the intermediate stream event data in. The bucket name must be without any prefix like \"gs://\". See the bucket naming requirements (https://cloud.google.com/storage/docs/buckets#naming). This field is optional. If not set, the Artifacts Cloud Storage bucket will be used.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Datastream service should use for the MySQL connection. This field is not returned on request.", + "type": "string" + }, + "reverseProxySubnet": { + "description": "Required. The URL of the subnetwork resource to create the VM instance hosting the reverse proxy in. More context in https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy The subnetwork should reside in the network provided in the request that Datastream will peer to and should be in the same region as Datastream, in the following format. projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "rootPath": { + "description": "Optional. The root path inside the Cloud Storage bucket. The stream event data will be written to this path. The default value is /migration.", + "type": "string" + }, + "subnetIpRange": { + "description": "Required. A /29 CIDR IP range for peering with datastream.", + "type": "string" + }, + "username": { + "description": "Required. The username that the Datastream service should use for the MySQL connection.", + "type": "string" + }, + "vpcNetwork": { + "description": "Required. Fully qualified name of the Cloud SQL instance's VPC network or the shared VPC network that Datastream will peer to, in the following format: projects/{project_id}/locations/global/networks/{network_id}. More context in https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig": { + "description": "Configuration information to establish customer database connection before the cutover phase of migration", + "id": "GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig", + "properties": { + "hiveDatabaseName": { + "description": "Required. The hive database name.", + "type": "string" + }, + "instanceConnectionName": { + "description": "Required. Cloud SQL database connection name (project_id:region:instance_name)", + "type": "string" + }, + "ipAddress": { + "description": "Required. The private IP address of the Cloud SQL instance.", + "type": "string" + }, + "natSubnet": { + "description": "Required. The relative resource name of the subnetwork to be used for Private Service Connect. Note that this cannot be a regular subnet and is used only for NAT. (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) This subnet is used to publish the SOCKS5 proxy service. The subnet size must be at least /29 and it should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Dataproc Metastore service will be using to connect to the database. This field is not returned on request.", + "type": "string" + }, + "port": { + "description": "Required. The network port of the database.", + "format": "int32", + "type": "integer" + }, + "proxySubnet": { + "description": "Required. The relative resource name of the subnetwork to deploy the SOCKS5 proxy service in. The subnetwork should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "username": { + "description": "Required. The username that Dataproc Metastore service will use to connect to the database.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig": { + "description": "Configuration information for migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore.", + "id": "GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig", + "properties": { + "cdcConfig": { + "$ref": "GoogleCloudMetastoreV2alphaCdcConfig", + "description": "Required. Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore. Dataproc Metastore switches to using its backend database after the cutover phase of migration." + }, + "cloudSqlConnectionConfig": { + "$ref": "GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig", + "description": "Required. Configuration information to establish customer database connection before the cutover phase of migration" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCompleteMigrationRequest": { + "description": "Request message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV2alphaCompleteMigrationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaDataCatalogConfig": { + "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.", + "id": "GoogleCloudMetastoreV2alphaDataCatalogConfig", + "properties": { + "enabled": { + "description": "Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaDatabaseDump": { + "description": "A specification of the location of and metadata about a database dump from a relational database management system.", + "id": "GoogleCloudMetastoreV2alphaDatabaseDump", + "properties": { + "gcsUri": { + "description": "Required. A Cloud Storage object or folder URI that specifies the source from which to import metadata. It must begin with gs://.", + "type": "string" + }, + "type": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaEncryptionConfig": { + "description": "Encryption settings for the service.", + "id": "GoogleCloudMetastoreV2alphaEncryptionConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaEndpoint": { + "description": "An endpoint used to access the metastore service.", + "id": "GoogleCloudMetastoreV2alphaEndpoint", + "properties": { + "endpointUri": { + "description": "Output only. The URI of the endpoint used to access the metastore service.", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. The region where the endpoint is located.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaExportMetadataRequest": { + "description": "Request message for DataprocMetastore.ExportMetadata.", + "id": "GoogleCloudMetastoreV2alphaExportMetadataRequest", + "properties": { + "databaseDumpType": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + }, + "destinationGcsFolder": { + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaHiveMetastoreConfig": { + "description": "Specifies configuration information specific to running Hive metastore software as the metastore service.", + "id": "GoogleCloudMetastoreV2alphaHiveMetastoreConfig", + "properties": { + "auxiliaryVersions": { + "additionalProperties": { + "$ref": "GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig" + }, + "description": "Optional. A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.", + "type": "object" + }, + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.", + "type": "object" + }, + "endpointProtocol": { + "description": "Optional. The protocol to use for the metastore service endpoint. If unspecified, defaults to GRPC.", + "enum": [ + "ENDPOINT_PROTOCOL_UNSPECIFIED", + "THRIFT", + "GRPC" + ], + "enumDescriptions": [ + "The protocol is not set.", + "Use the legacy Apache Thrift protocol for the metastore service endpoint.", + "Use the modernized gRPC protocol for the metastore service endpoint." + ], + "type": "string" + }, + "version": { + "description": "Immutable. The Hive metastore schema version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaImportMetadataRequest": { + "description": "Request message for DataprocMetastore.CreateMetadataImport.", + "id": "GoogleCloudMetastoreV2alphaImportMetadataRequest", + "properties": { + "databaseDump": { + "$ref": "GoogleCloudMetastoreV2alphaDatabaseDump", + "description": "Immutable. A database dump from a pre-existing metastore's database." + }, + "description": { + "description": "Optional. The description of the metadata import.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaLatestBackup": { + "description": "The details of the latest scheduled backup.", + "id": "GoogleCloudMetastoreV2alphaLatestBackup", + "properties": { + "backupId": { + "description": "Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress.", + "readOnly": true, + "type": "string" + }, + "duration": { + "description": "Output only. The duration of the backup completion.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is in progress.", + "The backup completed.", + "The backup failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaLimitConfig": { + "description": "Represents the autoscaling limit configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2alphaLimitConfig", + "properties": { + "maxScalingFactor": { + "description": "Optional. The highest scaling factor that the service should be autoscaled to.", + "format": "int32", + "type": "integer" + }, + "minScalingFactor": { + "description": "Optional. The lowest scaling factor that the service should be autoscaled to.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaListBackupsResponse": { + "description": "Response message for DataprocMetastore.ListBackups.", + "id": "GoogleCloudMetastoreV2alphaListBackupsResponse", + "properties": { + "backups": { + "description": "The backups of the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaBackup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse": { + "description": "Response message for DataprocMetastore.ListMigrationExecutions.", + "id": "GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse", + "properties": { + "migrationExecutions": { + "description": "The migration executions on the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaMigrationExecution" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaListServicesResponse": { + "description": "Response message for DataprocMetastore.ListServices.", + "id": "GoogleCloudMetastoreV2alphaListServicesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "services": { + "description": "The services in the specified location.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaService" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaMetadataIntegration": { + "description": "Specifies how metastore metadata should be integrated with external services.", + "id": "GoogleCloudMetastoreV2alphaMetadataIntegration", + "properties": { + "dataCatalogConfig": { + "$ref": "GoogleCloudMetastoreV2alphaDataCatalogConfig", + "description": "Optional. The integration config for the Data Catalog service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaMigrationExecution": { + "description": "The details of a migration execution resource.", + "id": "GoogleCloudMetastoreV2alphaMigrationExecution", + "properties": { + "cloudSqlMigrationConfig": { + "$ref": "GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig", + "description": "Configuration information specific to migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore." + }, + "createTime": { + "description": "Output only. The time when the migration execution was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the migration execution finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The relative resource name of the migration execution, in the following form: projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}", + "readOnly": true, + "type": "string" + }, + "phase": { + "description": "Output only. The current phase of the migration execution.", + "enum": [ + "PHASE_UNSPECIFIED", + "REPLICATION", + "CUTOVER" + ], + "enumDescriptions": [ + "The phase of the migration execution is unknown.", + "Replication phase refers to the migration phase when Dataproc Metastore is running a pipeline to replicate changes in the customer database to its backend database. During this phase, Dataproc Metastore uses the customer database as the hive metastore backend database.", + "Cutover phase refers to the migration phase when Dataproc Metastore switches to using its own backend database. Migration enters this phase when customer is done migrating all their clusters/workloads to Dataproc Metastore and triggers CompleteMigration." + ], + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the migration execution.", + "enum": [ + "STATE_UNSPECIFIED", + "STARTING", + "RUNNING", + "CANCELLING", + "AWAITING_USER_ACTION", + "SUCCEEDED", + "FAILED", + "CANCELLED", + "DELETING" + ], + "enumDescriptions": [ + "The state of the migration execution is unknown.", + "The migration execution is starting.", + "The migration execution is running.", + "The migration execution is in the process of being cancelled.", + "The migration execution is awaiting user action.", + "The migration execution has completed successfully.", + "The migration execution has failed.", + "The migration execution is cancelled.", + "The migration execution is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the migration execution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest": { + "description": "Request message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest", + "properties": { + "dbName": { + "description": "Required. The name of the database where the table resides.", + "type": "string" + }, + "destinationDbName": { + "description": "Required. The name of the database where the table should be moved.", + "type": "string" + }, + "tableName": { + "description": "Required. The name of the table to be moved.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaQueryMetadataRequest": { + "description": "Request message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV2alphaQueryMetadataRequest", + "properties": { + "query": { + "description": "Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest": { + "description": "Request message for DataprocMetastore.RemoveIamPolicy.", + "id": "GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest", + "properties": { + "asynchronous": { + "description": "Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse": { + "description": "Response message for DataprocMetastore.RemoveIamPolicy.", + "id": "GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse", + "properties": { + "success": { + "description": "True if the policy is successfully removed.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaRestoreServiceRequest": { + "description": "Request message for DataprocMetastore.Restore.", + "id": "GoogleCloudMetastoreV2alphaRestoreServiceRequest", + "properties": { + "backup": { + "description": "Optional. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. Mutually exclusive with backup_location, and exactly one of the two must be set.", + "type": "string" + }, + "backupLocation": { + "description": "Optional. A Cloud Storage URI specifying the location of the backup artifacts, namely - backup avro files under \"avro/\", backup_metastore.json and service.json, in the following form:gs://. Mutually exclusive with backup, and exactly one of the two must be set.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + }, + "restoreType": { + "description": "Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.", + "enum": [ + "RESTORE_TYPE_UNSPECIFIED", + "FULL", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "The restore type is unknown.", + "The service's metadata and configuration are restored.", + "Only the service's metadata is restored." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaScalingConfig": { + "description": "Represents the scaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2alphaScalingConfig", + "properties": { + "autoscalingConfig": { + "$ref": "GoogleCloudMetastoreV2alphaAutoscalingConfig", + "description": "Optional. The autoscaling configuration." + }, + "scalingFactor": { + "description": "Optional. Scaling factor from 1 to 5, increments of 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaScheduledBackup": { + "description": "This specifies the configuration of scheduled backup.", + "id": "GoogleCloudMetastoreV2alphaScheduledBackup", + "properties": { + "backupLocation": { + "description": "Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it.", + "type": "string" + }, + "cronSchedule": { + "description": "Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups.", + "type": "string" + }, + "enabled": { + "description": "Optional. Defines whether the scheduled backup is enabled. The default value is false.", + "type": "boolean" + }, + "latestBackup": { + "$ref": "GoogleCloudMetastoreV2alphaLatestBackup", + "description": "Output only. The details of the latest scheduled backup.", + "readOnly": true + }, + "nextScheduledTime": { + "description": "Output only. The time when the next backups execution is scheduled to start.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "timeZone": { + "description": "Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaService": { + "description": "A managed metastore service that serves metadata queries.", + "id": "GoogleCloudMetastoreV2alphaService", + "properties": { + "createTime": { + "description": "Output only. The time when the metastore service was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionConfig": { + "$ref": "GoogleCloudMetastoreV2alphaEncryptionConfig", + "description": "Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated." + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the metastore service.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "hiveMetastoreConfig": { + "$ref": "GoogleCloudMetastoreV2alphaHiveMetastoreConfig", + "description": "Configuration information specific to running Hive metastore software as the metastore service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for the metastore service.", + "type": "object" + }, + "metadataIntegration": { + "$ref": "GoogleCloudMetastoreV2alphaMetadataIntegration", + "description": "Optional. The setting that defines how metastore metadata should be integrated with external services and systems." + }, + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "type": "string" + }, + "scalingConfig": { + "$ref": "GoogleCloudMetastoreV2alphaScalingConfig", + "description": "Optional. Scaling configuration of the metastore service." + }, + "scheduledBackup": { + "$ref": "GoogleCloudMetastoreV2alphaScheduledBackup", + "description": "Optional. The configuration of scheduled backup for the metastore service." + }, + "state": { + "description": "Output only. The current state of the metastore service.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "SUSPENDING", + "SUSPENDED", + "UPDATING", + "DELETING", + "ERROR", + "MIGRATING" + ], + "enumDescriptions": [ + "The state of the metastore service is unknown.", + "The metastore service is in the process of being created.", + "The metastore service is running and ready to serve queries.", + "The metastore service is entering suspension. Its query-serving availability may cease unexpectedly.", + "The metastore service is suspended and unable to serve queries.", + "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", + "The metastore service is undergoing deletion. It cannot be used.", + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted.", + "The metastore service is processing a managed migration." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the metastore service, if available.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The globally unique resource identifier of the metastore service.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metastore service was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "warehouseGcsUri": { + "description": "Required. A Cloud Storage URI (starting with gs://) that specifies the default warehouse directory of the Hive Metastore.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaStartMigrationRequest": { + "description": "Request message for DataprocMetastore.StartMigration.", + "id": "GoogleCloudMetastoreV2alphaStartMigrationRequest", + "properties": { + "migrationExecution": { + "$ref": "GoogleCloudMetastoreV2alphaMigrationExecution", + "description": "Required. The configuration details for the migration." + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Dataproc Metastore API", + "version": "v2alpha", + "version_module": true +} \ No newline at end of file diff --git a/metastore/v2alpha/metastore-gen.go b/metastore/v2alpha/metastore-gen.go new file mode 100644 index 00000000000..63e0e064bfc --- /dev/null +++ b/metastore/v2alpha/metastore-gen.go @@ -0,0 +1,4855 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package metastore provides access to the Dataproc Metastore API. +// +// For product documentation, see: https://cloud.google.com/dataproc-metastore/docs +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/metastore/v2alpha" +// ... +// ctx := context.Background() +// metastoreService, err := metastore.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package metastore // import "google.golang.org/api/metastore/v2alpha" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "metastore:v2alpha" +const apiName = "metastore" +const apiVersion = "v2alpha" +const basePath = "https://metastore.googleapis.com/" +const basePathTemplate = "https://metastore.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://metastore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Services = NewProjectsLocationsServicesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Services *ProjectsLocationsServicesService +} + +func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService { + rs := &ProjectsLocationsServicesService{s: s} + rs.Backups = NewProjectsLocationsServicesBackupsService(s) + rs.MigrationExecutions = NewProjectsLocationsServicesMigrationExecutionsService(s) + return rs +} + +type ProjectsLocationsServicesService struct { + s *Service + + Backups *ProjectsLocationsServicesBackupsService + + MigrationExecutions *ProjectsLocationsServicesMigrationExecutionsService +} + +func NewProjectsLocationsServicesBackupsService(s *Service) *ProjectsLocationsServicesBackupsService { + rs := &ProjectsLocationsServicesBackupsService{s: s} + return rs +} + +type ProjectsLocationsServicesBackupsService struct { + s *Service +} + +func NewProjectsLocationsServicesMigrationExecutionsService(s *Service) *ProjectsLocationsServicesMigrationExecutionsService { + rs := &ProjectsLocationsServicesMigrationExecutionsService{s: s} + return rs +} + +type ProjectsLocationsServicesMigrationExecutionsService struct { + s *Service +} + +// GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1CustomRegionMetadata: Metadata about a custom region. +// This is only populated if the region is a custom region. For single/multi +// regions, it will be empty. +type GoogleCloudMetastoreV1CustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1CustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1CustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1ErrorDetails: Error details in public error message +// for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1ErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1ErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1ErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1HiveMetastoreVersion: A specification of a supported +// version of the Hive Metastore software. +type GoogleCloudMetastoreV1HiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1HiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1HiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1LocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1LocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1CustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1MultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1MoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1MoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1MultiRegionMetadata: The metadata for the multi-region +// that includes the constituent regions. The metadata is only populated if the +// region is multi-region. For single region or custom dual region, it will be +// empty. +type GoogleCloudMetastoreV1MultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1MultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1MultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1OperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1QueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1QueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1QueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1QueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1alphaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1alphaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1alphaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1alphaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1alphaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1alphaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1alphaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1alphaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1alphaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1alphaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1alphaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1alphaOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1betaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1betaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1betaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1betaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1betaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1betaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1betaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1betaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1betaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1betaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1betaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1betaOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest: Request +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest struct { + // LocationUri: Required. The new location URI for the metadata resource. + LocationUri string `json:"locationUri,omitempty"` + // ResourceName: Required. The relative metadata resource name in the following + // format.databases/{database_id} or databases/{database_id}/tables/{table_id} + // or databases/{database_id}/tables/{table_id}/partitions/{partition_id} + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "LocationUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocationUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest: Request message for +// DataprocMetastore.AlterTableProperties. +type GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest struct { + // Properties: A map that describes the desired values to mutate. If + // update_mask is empty, the properties will not update. Otherwise, the + // properties only alters the value whose associated paths exist in the update + // mask + Properties map[string]string `json:"properties,omitempty"` + // TableName: Required. The name of the table containing the properties you're + // altering in the following format.databases/{database_id}/tables/{table_id} + TableName string `json:"tableName,omitempty"` + // UpdateMask: A field mask that specifies the metadata table properties that + // are overwritten by the update. Fields specified in the update_mask are + // relative to the resource (not to the full request). A field is overwritten + // if it is in the mask.For example, given the target properties: properties { + // a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if + // the field mask is:paths: "properties.b", "properties.c"then the result will + // be: properties { a: 1 b: 3 c: 4 } + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Properties") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Properties") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaAutoscalingConfig: Represents the autoscaling +// configuration of a metastore service. +type GoogleCloudMetastoreV2alphaAutoscalingConfig struct { + // AutoscalingEnabled: Optional. Whether or not autoscaling is enabled for this + // service. + AutoscalingEnabled bool `json:"autoscalingEnabled,omitempty"` + // AutoscalingFactor: Output only. The scaling factor of a service with + // autoscaling enabled. + AutoscalingFactor int64 `json:"autoscalingFactor,omitempty"` + // LimitConfig: Optional. The LimitConfig of the service. + LimitConfig *GoogleCloudMetastoreV2alphaLimitConfig `json:"limitConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaAutoscalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaAutoscalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig: Configuration information +// for the auxiliary service versions. +type GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig struct { + // ConfigOverrides: A mapping of Hive metastore configuration key-value pairs + // to apply to the auxiliary Hive metastore (configured in hive-site.xml) in + // addition to the primary version's overrides. If keys are present in both the + // auxiliary version's overrides and the primary version's overrides, the value + // from the auxiliary version's overrides takes precedence. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the auxiliary + // metastore service, includes version and region data. + Endpoints []*GoogleCloudMetastoreV2alphaEndpoint `json:"endpoints,omitempty"` + // Version: The Hive metastore version of the auxiliary service. It must be + // less than the primary Hive metastore service's version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfigOverrides") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaBackup: The details of a backup resource. +type GoogleCloudMetastoreV2alphaBackup struct { + // CreateTime: Output only. The time when the backup was started. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the backup. + Description string `json:"description,omitempty"` + // EndTime: Output only. The time when the backup finished creating. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. The relative resource name of the backup, in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // backups/{backup_id} + Name string `json:"name,omitempty"` + // RestoringServices: Output only. Services that are restoring from the backup. + RestoringServices []string `json:"restoringServices,omitempty"` + // ServiceRevision: Output only. The revision of the service at the time of + // backup. + ServiceRevision *GoogleCloudMetastoreV2alphaService `json:"serviceRevision,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "CREATING" - The backup is being created. + // "DELETING" - The backup is being deleted. + // "ACTIVE" - The backup is active and ready to use. + // "FAILED" - The backup failed. + // "RESTORING" - The backup is being restored. + 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. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaCancelMigrationRequest: Request message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV2alphaCancelMigrationRequest struct { +} + +// GoogleCloudMetastoreV2alphaCdcConfig: Configuration information to start the +// Change Data Capture (CDC) streams from customer database to backend database +// of Dataproc Metastore. +type GoogleCloudMetastoreV2alphaCdcConfig struct { + // Bucket: Optional. The bucket to write the intermediate stream event data in. + // The bucket name must be without any prefix like "gs://". See the bucket + // naming requirements (https://cloud.google.com/storage/docs/buckets#naming). + // This field is optional. If not set, the Artifacts Cloud Storage bucket will + // be used. + Bucket string `json:"bucket,omitempty"` + // Password: Required. Input only. The password for the user that Datastream + // service should use for the MySQL connection. This field is not returned on + // request. + Password string `json:"password,omitempty"` + // ReverseProxySubnet: Required. The URL of the subnetwork resource to create + // the VM instance hosting the reverse proxy in. More context in + // https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy + // The subnetwork should reside in the network provided in the request that + // Datastream will peer to and should be in the same region as Datastream, in + // the following format. + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ReverseProxySubnet string `json:"reverseProxySubnet,omitempty"` + // RootPath: Optional. The root path inside the Cloud Storage bucket. The + // stream event data will be written to this path. The default value is + // /migration. + RootPath string `json:"rootPath,omitempty"` + // SubnetIpRange: Required. A /29 CIDR IP range for peering with datastream. + SubnetIpRange string `json:"subnetIpRange,omitempty"` + // Username: Required. The username that the Datastream service should use for + // the MySQL connection. + Username string `json:"username,omitempty"` + // VpcNetwork: Required. Fully qualified name of the Cloud SQL instance's VPC + // network or the shared VPC network that Datastream will peer to, in the + // following format: + // projects/{project_id}/locations/global/networks/{network_id}. More context + // in + // https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity + VpcNetwork string `json:"vpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaCdcConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaCdcConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig: Configuration +// information to establish customer database connection before the cutover +// phase of migration +type GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig struct { + // HiveDatabaseName: Required. The hive database name. + HiveDatabaseName string `json:"hiveDatabaseName,omitempty"` + // InstanceConnectionName: Required. Cloud SQL database connection name + // (project_id:region:instance_name) + InstanceConnectionName string `json:"instanceConnectionName,omitempty"` + // IpAddress: Required. The private IP address of the Cloud SQL instance. + IpAddress string `json:"ipAddress,omitempty"` + // NatSubnet: Required. The relative resource name of the subnetwork to be used + // for Private Service Connect. Note that this cannot be a regular subnet and + // is used only for NAT. + // (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) + // This subnet is used to publish the SOCKS5 proxy service. The subnet size + // must be at least /29 and it should reside in a network through which the + // Cloud SQL instance is accessible. The resource name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + NatSubnet string `json:"natSubnet,omitempty"` + // Password: Required. Input only. The password for the user that Dataproc + // Metastore service will be using to connect to the database. This field is + // not returned on request. + Password string `json:"password,omitempty"` + // Port: Required. The network port of the database. + Port int64 `json:"port,omitempty"` + // ProxySubnet: Required. The relative resource name of the subnetwork to + // deploy the SOCKS5 proxy service in. The subnetwork should reside in a + // network through which the Cloud SQL instance is accessible. The resource + // name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ProxySubnet string `json:"proxySubnet,omitempty"` + // Username: Required. The username that Dataproc Metastore service will use to + // connect to the database. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "HiveDatabaseName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HiveDatabaseName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig: Configuration +// information for migrating from self-managed hive metastore on Google Cloud +// using Cloud SQL as the backend database to Dataproc Metastore. +type GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig struct { + // CdcConfig: Required. Configuration information to start the Change Data + // Capture (CDC) streams from customer database to backend database of Dataproc + // Metastore. Dataproc Metastore switches to using its backend database after + // the cutover phase of migration. + CdcConfig *GoogleCloudMetastoreV2alphaCdcConfig `json:"cdcConfig,omitempty"` + // CloudSqlConnectionConfig: Required. Configuration information to establish + // customer database connection before the cutover phase of migration + CloudSqlConnectionConfig *GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig `json:"cloudSqlConnectionConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "CdcConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CdcConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaCompleteMigrationRequest: Request message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV2alphaCompleteMigrationRequest struct { +} + +// GoogleCloudMetastoreV2alphaDataCatalogConfig: Specifies how metastore +// metadata should be integrated with the Data Catalog service. +type GoogleCloudMetastoreV2alphaDataCatalogConfig struct { + // Enabled: Optional. Defines whether the metastore metadata should be synced + // to Data Catalog. The default value is to disable syncing metastore metadata + // to Data Catalog. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaDataCatalogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaDataCatalogConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaDatabaseDump: A specification of the location of +// and metadata about a database dump from a relational database management +// system. +type GoogleCloudMetastoreV2alphaDatabaseDump struct { + // GcsUri: Required. A Cloud Storage object or folder URI that specifies the + // source from which to import metadata. It must begin with gs://. + GcsUri string `json:"gcsUri,omitempty"` + // Type: Optional. The type of the database dump. If unspecified, defaults to + // MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaDatabaseDump) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaDatabaseDump + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaEncryptionConfig: Encryption settings for the +// service. +type GoogleCloudMetastoreV2alphaEncryptionConfig struct { +} + +// GoogleCloudMetastoreV2alphaEndpoint: An endpoint used to access the +// metastore service. +type GoogleCloudMetastoreV2alphaEndpoint struct { + // EndpointUri: Output only. The URI of the endpoint used to access the + // metastore service. + EndpointUri string `json:"endpointUri,omitempty"` + // Region: Output only. The region where the endpoint is located. + Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndpointUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaEndpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaExportMetadataRequest: Request message for +// DataprocMetastore.ExportMetadata. +type GoogleCloudMetastoreV2alphaExportMetadataRequest struct { + // DatabaseDumpType: Optional. The type of the database dump. If unspecified, + // defaults to MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + DatabaseDumpType string `json:"databaseDumpType,omitempty"` + // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///. + // A sub-folder containing exported files will be created below it. + DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaExportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaExportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaHiveMetastoreConfig: Specifies configuration +// information specific to running Hive metastore software as the metastore +// service. +type GoogleCloudMetastoreV2alphaHiveMetastoreConfig struct { + // AuxiliaryVersions: Optional. A mapping of Hive metastore version to the + // auxiliary version configuration. When specified, a secondary Hive metastore + // service is created along with the primary service. All auxiliary versions + // must be less than the service's primary version. The key is the auxiliary + // service name and it must match the regular expression a-z?. This means that + // the first character must be a lowercase letter, and all the following + // characters must be hyphens, lowercase letters, or digits, except the last + // character, which cannot be a hyphen. + AuxiliaryVersions map[string]GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"` + // ConfigOverrides: Optional. A mapping of Hive metastore configuration + // key-value pairs to apply to the Hive metastore (configured in + // hive-site.xml). The mappings override system defaults (some keys cannot be + // overridden). These overrides are also applied to auxiliary versions and can + // be further customized in the auxiliary version's AuxiliaryVersionConfig. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // EndpointProtocol: Optional. The protocol to use for the metastore service + // endpoint. If unspecified, defaults to GRPC. + // + // Possible values: + // "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set. + // "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service + // endpoint. + // "GRPC" - Use the modernized gRPC protocol for the metastore service + // endpoint. + EndpointProtocol string `json:"endpointProtocol,omitempty"` + // Version: Immutable. The Hive metastore schema version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaHiveMetastoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaHiveMetastoreConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaImportMetadataRequest: Request message for +// DataprocMetastore.CreateMetadataImport. +type GoogleCloudMetastoreV2alphaImportMetadataRequest struct { + // DatabaseDump: Immutable. A database dump from a pre-existing metastore's + // database. + DatabaseDump *GoogleCloudMetastoreV2alphaDatabaseDump `json:"databaseDump,omitempty"` + // Description: Optional. The description of the metadata import. + Description string `json:"description,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDump") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDump") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaImportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaImportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaLatestBackup: The details of the latest scheduled +// backup. +type GoogleCloudMetastoreV2alphaLatestBackup struct { + // BackupId: Output only. The ID of an in-progress scheduled backup. Empty if + // no backup is in progress. + BackupId string `json:"backupId,omitempty"` + // Duration: Output only. The duration of the backup completion. + Duration string `json:"duration,omitempty"` + // StartTime: Output only. The time when the backup was started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "IN_PROGRESS" - The backup is in progress. + // "SUCCEEDED" - The backup completed. + // "FAILED" - The backup failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaLatestBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaLatestBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaLimitConfig: Represents the autoscaling limit +// configuration of a metastore service. +type GoogleCloudMetastoreV2alphaLimitConfig struct { + // MaxScalingFactor: Optional. The highest scaling factor that the service + // should be autoscaled to. + MaxScalingFactor int64 `json:"maxScalingFactor,omitempty"` + // MinScalingFactor: Optional. The lowest scaling factor that the service + // should be autoscaled to. + MinScalingFactor int64 `json:"minScalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxScalingFactor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxScalingFactor") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaLimitConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaLimitConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaListBackupsResponse: Response message for +// DataprocMetastore.ListBackups. +type GoogleCloudMetastoreV2alphaListBackupsResponse struct { + // Backups: The backups of the specified service. + Backups []*GoogleCloudMetastoreV2alphaBackup `json:"backups,omitempty"` + // NextPageToken: A token that can be sent as page_token to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse: Response message +// for DataprocMetastore.ListMigrationExecutions. +type GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse struct { + // MigrationExecutions: The migration executions on the specified service. + MigrationExecutions []*GoogleCloudMetastoreV2alphaMigrationExecution `json:"migrationExecutions,omitempty"` + // NextPageToken: A token that can be sent as page_token to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "MigrationExecutions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecutions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaListServicesResponse: Response message for +// DataprocMetastore.ListServices. +type GoogleCloudMetastoreV2alphaListServicesResponse struct { + // NextPageToken: A token that can be sent as page_token to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Services: The services in the specified location. + Services []*GoogleCloudMetastoreV2alphaService `json:"services,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaListServicesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaMetadataIntegration: Specifies how metastore +// metadata should be integrated with external services. +type GoogleCloudMetastoreV2alphaMetadataIntegration struct { + // DataCatalogConfig: Optional. The integration config for the Data Catalog + // service. + DataCatalogConfig *GoogleCloudMetastoreV2alphaDataCatalogConfig `json:"dataCatalogConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataCatalogConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaMetadataIntegration) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaMetadataIntegration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaMigrationExecution: The details of a migration +// execution resource. +type GoogleCloudMetastoreV2alphaMigrationExecution struct { + // CloudSqlMigrationConfig: Configuration information specific to migrating + // from self-managed hive metastore on Google Cloud using Cloud SQL as the + // backend database to Dataproc Metastore. + CloudSqlMigrationConfig *GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig `json:"cloudSqlMigrationConfig,omitempty"` + // CreateTime: Output only. The time when the migration execution was started. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time when the migration execution finished. + EndTime string `json:"endTime,omitempty"` + // Name: Output only. The relative resource name of the migration execution, in + // the following form: + // projects/{project_number}/locations/{location_id}/services/{service_id}/migra + // tionExecutions/{migration_execution_id} + Name string `json:"name,omitempty"` + // Phase: Output only. The current phase of the migration execution. + // + // Possible values: + // "PHASE_UNSPECIFIED" - The phase of the migration execution is unknown. + // "REPLICATION" - Replication phase refers to the migration phase when + // Dataproc Metastore is running a pipeline to replicate changes in the + // customer database to its backend database. During this phase, Dataproc + // Metastore uses the customer database as the hive metastore backend database. + // "CUTOVER" - Cutover phase refers to the migration phase when Dataproc + // Metastore switches to using its own backend database. Migration enters this + // phase when customer is done migrating all their clusters/workloads to + // Dataproc Metastore and triggers CompleteMigration. + Phase string `json:"phase,omitempty"` + // State: Output only. The current state of the migration execution. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the migration execution is unknown. + // "STARTING" - The migration execution is starting. + // "RUNNING" - The migration execution is running. + // "CANCELLING" - The migration execution is in the process of being + // cancelled. + // "AWAITING_USER_ACTION" - The migration execution is awaiting user action. + // "SUCCEEDED" - The migration execution has completed successfully. + // "FAILED" - The migration execution has failed. + // "CANCELLED" - The migration execution is cancelled. + // "DELETING" - The migration execution is being deleted. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the migration execution. + StateMessage string `json:"stateMessage,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaMigrationExecution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaMigrationExecution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest: Request message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest struct { + // DbName: Required. The name of the database where the table resides. + DbName string `json:"dbName,omitempty"` + // DestinationDbName: Required. The name of the database where the table should + // be moved. + DestinationDbName string `json:"destinationDbName,omitempty"` + // TableName: Required. The name of the table to be moved. + TableName string `json:"tableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbName") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaQueryMetadataRequest: Request message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV2alphaQueryMetadataRequest struct { + // Query: Required. A read-only SQL query to execute against the metadata + // database. The query cannot change or mutate the data. + Query string `json:"query,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaQueryMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaQueryMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest: Request message for +// DataprocMetastore.RemoveIamPolicy. +type GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest struct { + // Asynchronous: Optional. Removes IAM policy attached to database or table + // asynchronously when it is set. The default is false. + Asynchronous bool `json:"asynchronous,omitempty"` + // ForceSendFields is a list of field names (e.g. "Asynchronous") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Asynchronous") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse: Response message for +// DataprocMetastore.RemoveIamPolicy. +type GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse struct { + // Success: True if the policy is successfully removed. + Success bool `json:"success,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Success") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Success") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaRestoreServiceRequest: Request message for +// DataprocMetastore.Restore. +type GoogleCloudMetastoreV2alphaRestoreServiceRequest struct { + // Backup: Optional. The relative resource name of the metastore service backup + // to restore from, in the following + // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back + // ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of + // the two must be set. + Backup string `json:"backup,omitempty"` + // BackupLocation: Optional. A Cloud Storage URI specifying the location of the + // backup artifacts, namely - backup avro files under "avro/", + // backup_metastore.json and service.json, in the following form:gs://. + // Mutually exclusive with backup, and exactly one of the two must be set. + BackupLocation string `json:"backupLocation,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // RestoreType: Optional. The type of restore. If unspecified, defaults to + // METADATA_ONLY. + // + // Possible values: + // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown. + // "FULL" - The service's metadata and configuration are restored. + // "METADATA_ONLY" - Only the service's metadata is restored. + RestoreType string `json:"restoreType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaRestoreServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaRestoreServiceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaScalingConfig: Represents the scaling +// configuration of a metastore service. +type GoogleCloudMetastoreV2alphaScalingConfig struct { + // AutoscalingConfig: Optional. The autoscaling configuration. + AutoscalingConfig *GoogleCloudMetastoreV2alphaAutoscalingConfig `json:"autoscalingConfig,omitempty"` + // ScalingFactor: Optional. Scaling factor from 1 to 5, increments of 1. + ScalingFactor int64 `json:"scalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaScalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaScalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaScheduledBackup: This specifies the configuration +// of scheduled backup. +type GoogleCloudMetastoreV2alphaScheduledBackup struct { + // BackupLocation: Optional. A Cloud Storage URI of a folder, in the format + // gs:///. A sub-folder containing backup files will be stored below it. + BackupLocation string `json:"backupLocation,omitempty"` + // CronSchedule: Optional. The scheduled interval in Cron format, see + // https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is + // not enabled. Must be specified to enable scheduled backups. + CronSchedule string `json:"cronSchedule,omitempty"` + // Enabled: Optional. Defines whether the scheduled backup is enabled. The + // default value is false. + Enabled bool `json:"enabled,omitempty"` + // LatestBackup: Output only. The details of the latest scheduled backup. + LatestBackup *GoogleCloudMetastoreV2alphaLatestBackup `json:"latestBackup,omitempty"` + // NextScheduledTime: Output only. The time when the next backups execution is + // scheduled to start. + NextScheduledTime string `json:"nextScheduledTime,omitempty"` + // TimeZone: Optional. Specifies the time zone to be used when interpreting + // cron_schedule. Must be a time zone name from the time zone database + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. + // America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is + // UTC. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaScheduledBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaScheduledBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaService: A managed metastore service that serves +// metadata queries. +type GoogleCloudMetastoreV2alphaService struct { + // CreateTime: Output only. The time when the metastore service was created. + CreateTime string `json:"createTime,omitempty"` + // EncryptionConfig: Immutable. Information used to configure the Dataproc + // Metastore service to encrypt customer data at rest. Cannot be updated. + EncryptionConfig *GoogleCloudMetastoreV2alphaEncryptionConfig `json:"encryptionConfig,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the metastore + // service. + Endpoints []*GoogleCloudMetastoreV2alphaEndpoint `json:"endpoints,omitempty"` + // HiveMetastoreConfig: Configuration information specific to running Hive + // metastore software as the metastore service. + HiveMetastoreConfig *GoogleCloudMetastoreV2alphaHiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"` + // Labels: User-defined labels for the metastore service. + Labels map[string]string `json:"labels,omitempty"` + // MetadataIntegration: Optional. The setting that defines how metastore + // metadata should be integrated with external services and systems. + MetadataIntegration *GoogleCloudMetastoreV2alphaMetadataIntegration `json:"metadataIntegration,omitempty"` + // Name: Immutable. The relative resource name of the metastore service, in the + // following + // format:projects/{project_number}/locations/{location_id}/services/{service_id + // }. + Name string `json:"name,omitempty"` + // ScalingConfig: Optional. Scaling configuration of the metastore service. + ScalingConfig *GoogleCloudMetastoreV2alphaScalingConfig `json:"scalingConfig,omitempty"` + // ScheduledBackup: Optional. The configuration of scheduled backup for the + // metastore service. + ScheduledBackup *GoogleCloudMetastoreV2alphaScheduledBackup `json:"scheduledBackup,omitempty"` + // State: Output only. The current state of the metastore service. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metastore service is unknown. + // "CREATING" - The metastore service is in the process of being created. + // "ACTIVE" - The metastore service is running and ready to serve queries. + // "SUSPENDING" - The metastore service is entering suspension. Its + // query-serving availability may cease unexpectedly. + // "SUSPENDED" - The metastore service is suspended and unable to serve + // queries. + // "UPDATING" - The metastore service is being updated. It remains usable but + // cannot accept additional update requests or be deleted at this time. + // "DELETING" - The metastore service is undergoing deletion. It cannot be + // used. + // "ERROR" - The metastore service has encountered an error and cannot be + // used. The metastore service should be deleted. + // "MIGRATING" - The metastore service is processing a managed migration. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the metastore service, if available. + StateMessage string `json:"stateMessage,omitempty"` + // Uid: Output only. The globally unique resource identifier of the metastore + // service. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The time when the metastore service was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // WarehouseGcsUri: Required. A Cloud Storage URI (starting with gs://) that + // specifies the default warehouse directory of the Hive Metastore. + WarehouseGcsUri string `json:"warehouseGcsUri,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaService) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaService + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaStartMigrationRequest: Request message for +// DataprocMetastore.StartMigration. +type GoogleCloudMetastoreV2alphaStartMigrationRequest struct { + // MigrationExecution: Required. The configuration details for the migration. + MigrationExecution *GoogleCloudMetastoreV2alphaMigrationExecution `json:"migrationExecution,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaStartMigrationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaStartMigrationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is false, it means the operation is still in progress. If + // true, the operation is completed, and either error or response is available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the name + // should be a resource name ending with operations/{unique_id}. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as Delete, the response is + // google.protobuf.Empty. If the original method is standard Get/Create/Update, + // the response should be the resource. For other methods, the response should + // have the type XxxResponse, where Xxx is the original method name. For + // example, if the original method name is TakeSnapshot(), the inferred + // response type is TakeSnapshotResponse. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleRpcStatus: The Status type defines a logical error model that is +// suitable for different programming environments, including REST APIs and RPC +// APIs. It is used by gRPC (https://github.com/grpc). Each Status message +// contains three pieces of data: error code, error message, and error +// details.You can find out more about this error model and how to work with it +// in the API Design Guide (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsServicesAlterLocationCall struct { + s *Service + service string + googlecloudmetastorev2alphaaltermetadataresourcelocationrequest *GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterLocation: Alter metadata resource location. The metadata resource can +// be a database, table, or partition. This functionality only updates the +// parent directory for the respective metadata resource and does not transfer +// any existing data to the new location. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterLocation(service string, googlecloudmetastorev2alphaaltermetadataresourcelocationrequest *GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall { + c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphaaltermetadataresourcelocationrequest = googlecloudmetastorev2alphaaltermetadataresourcelocationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaaltermetadataresourcelocationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:alterLocation") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterLocation" call. +// 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 *ProjectsLocationsServicesAlterLocationCall) 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 +} + +type ProjectsLocationsServicesAlterTablePropertiesCall struct { + s *Service + service string + googlecloudmetastorev2alphaaltertablepropertiesrequest *GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterTableProperties: Alter metadata table properties. +// +// - service: The relative resource name of the Dataproc Metastore service +// that's being used to mutate metadata table properties, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, googlecloudmetastorev2alphaaltertablepropertiesrequest *GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall { + c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphaaltertablepropertiesrequest = googlecloudmetastorev2alphaaltertablepropertiesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaaltertablepropertiesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:alterTableProperties") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterTableProperties" call. +// 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 *ProjectsLocationsServicesAlterTablePropertiesCall) 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 +} + +type ProjectsLocationsServicesCancelMigrationCall struct { + s *Service + service string + googlecloudmetastorev2alphacancelmigrationrequest *GoogleCloudMetastoreV2alphaCancelMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CancelMigration: Cancels the ongoing Managed Migration process. +// +// - service: The relative resource name of the metastore service to cancel the +// ongoing migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CancelMigration(service string, googlecloudmetastorev2alphacancelmigrationrequest *GoogleCloudMetastoreV2alphaCancelMigrationRequest) *ProjectsLocationsServicesCancelMigrationCall { + c := &ProjectsLocationsServicesCancelMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphacancelmigrationrequest = googlecloudmetastorev2alphacancelmigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCancelMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCancelMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCancelMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCancelMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCancelMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCancelMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphacancelmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:cancelMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.cancelMigration" call. +// 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 *ProjectsLocationsServicesCancelMigrationCall) 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 +} + +type ProjectsLocationsServicesCompleteMigrationCall struct { + s *Service + service string + googlecloudmetastorev2alphacompletemigrationrequest *GoogleCloudMetastoreV2alphaCompleteMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CompleteMigration: Completes the managed migration process. The Dataproc +// Metastore service will switch to using its own backend database after +// successful migration. +// +// - service: The relative resource name of the metastore service to complete +// the migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CompleteMigration(service string, googlecloudmetastorev2alphacompletemigrationrequest *GoogleCloudMetastoreV2alphaCompleteMigrationRequest) *ProjectsLocationsServicesCompleteMigrationCall { + c := &ProjectsLocationsServicesCompleteMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphacompletemigrationrequest = googlecloudmetastorev2alphacompletemigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCompleteMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCompleteMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCompleteMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphacompletemigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:completeMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.completeMigration" call. +// 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 *ProjectsLocationsServicesCompleteMigrationCall) 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 +} + +type ProjectsLocationsServicesCreateCall struct { + s *Service + parent string + googlecloudmetastorev2alphaservice *GoogleCloudMetastoreV2alphaService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore service in a project and location. +// +// - parent: The relative resource name of the location in which to create a +// metastore service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) Create(parent string, googlecloudmetastorev2alphaservice *GoogleCloudMetastoreV2alphaService) *ProjectsLocationsServicesCreateCall { + c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2alphaservice = googlecloudmetastorev2alphaservice + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The ID of the +// metastore service, which is used as the final component of the metastore +// service's name.This value must be between 2 and 63 characters long +// inclusive, begin with a letter, end with a letter or number, and consist of +// alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/services") + 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 "metastore.projects.locations.services.create" call. +// 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 *ProjectsLocationsServicesCreateCall) 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 +} + +type ProjectsLocationsServicesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single service. +// +// - name: The relative resource name of the metastore service to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { + c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.delete" call. +// 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 *ProjectsLocationsServicesDeleteCall) 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 +} + +type ProjectsLocationsServicesExportMetadataCall struct { + s *Service + service string + googlecloudmetastorev2alphaexportmetadatarequest *GoogleCloudMetastoreV2alphaExportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportMetadata: Exports metadata from a service. +// +// - service: The relative resource name of the metastore service to run +// export, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ExportMetadata(service string, googlecloudmetastorev2alphaexportmetadatarequest *GoogleCloudMetastoreV2alphaExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall { + c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphaexportmetadatarequest = googlecloudmetastorev2alphaexportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaexportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:exportMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.exportMetadata" call. +// 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 *ProjectsLocationsServicesExportMetadataCall) 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 +} + +type ProjectsLocationsServicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single service. +// +// - name: The relative resource name of the metastore service to retrieve, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall { + c := &ProjectsLocationsServicesGetCall{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 +// details. +func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2alpha/{+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 "metastore.projects.locations.services.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaService.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 *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaService, 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 := &GoogleCloudMetastoreV2alphaService{ + 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 +} + +type ProjectsLocationsServicesImportMetadataCall struct { + s *Service + name string + googlecloudmetastorev2alphaimportmetadatarequest *GoogleCloudMetastoreV2alphaImportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportMetadata: Imports Metadata into a Dataproc Metastore service. +// +// - name: Immutable. The relative resource name of the metastore service to +// run import, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ImportMetadata(name string, googlecloudmetastorev2alphaimportmetadatarequest *GoogleCloudMetastoreV2alphaImportMetadataRequest) *ProjectsLocationsServicesImportMetadataCall { + c := &ProjectsLocationsServicesImportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2alphaimportmetadatarequest = googlecloudmetastorev2alphaimportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesImportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesImportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesImportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesImportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesImportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesImportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaimportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+name}:importMetadata") + 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 "metastore.projects.locations.services.importMetadata" call. +// 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 *ProjectsLocationsServicesImportMetadataCall) 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 +} + +type ProjectsLocationsServicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists services in a project and location. +// +// - parent: The relative resource name of the location of metastore services +// to list, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall { + c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// services to return. The response may contain less than the maximum number. +// If unspecified, no more than 500 services are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListServices call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListServices must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall { + 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 +// details. +func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2alpha/{+parent}/services") + 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 "metastore.projects.locations.services.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaListServicesResponse.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 *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaListServicesResponse, 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 := &GoogleCloudMetastoreV2alphaListServicesResponse{ + 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 +} + +// 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 *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2alphaListServicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsServicesMoveTableToDatabaseCall struct { + s *Service + service string + googlecloudmetastorev2alphamovetabletodatabaserequest *GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MoveTableToDatabase: Move a table to another database. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, googlecloudmetastorev2alphamovetabletodatabaserequest *GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphamovetabletodatabaserequest = googlecloudmetastorev2alphamovetabletodatabaserequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphamovetabletodatabaserequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:moveTableToDatabase") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.moveTableToDatabase" call. +// 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 *ProjectsLocationsServicesMoveTableToDatabaseCall) 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 +} + +type ProjectsLocationsServicesPatchCall struct { + s *Service + name string + googlecloudmetastorev2alphaservice *GoogleCloudMetastoreV2alphaService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single service. +// +// - name: Immutable. The relative resource name of the metastore service, in +// the following +// format:projects/{project_number}/locations/{location_id}/services/{service_ +// id}. +func (r *ProjectsLocationsServicesService) Patch(name string, googlecloudmetastorev2alphaservice *GoogleCloudMetastoreV2alphaService) *ProjectsLocationsServicesPatchCall { + c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2alphaservice = googlecloudmetastorev2alphaservice + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A field mask +// used to specify the fields to be overwritten in the metastore service +// resource by the update. Fields specified in the update_mask are relative to +// the resource (not to the full request). A field is overwritten if it is in +// the mask. +func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.patch" call. +// 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 *ProjectsLocationsServicesPatchCall) 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 +} + +type ProjectsLocationsServicesQueryMetadataCall struct { + s *Service + service string + googlecloudmetastorev2alphaquerymetadatarequest *GoogleCloudMetastoreV2alphaQueryMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// QueryMetadata: Query Dataproc Metastore metadata. +// +// - service: The relative resource name of the metastore service to query +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) QueryMetadata(service string, googlecloudmetastorev2alphaquerymetadatarequest *GoogleCloudMetastoreV2alphaQueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall { + c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphaquerymetadatarequest = googlecloudmetastorev2alphaquerymetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaquerymetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:queryMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.queryMetadata" call. +// 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 *ProjectsLocationsServicesQueryMetadataCall) 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 +} + +type ProjectsLocationsServicesRemoveIamPolicyCall struct { + s *Service + resource string + googlecloudmetastorev2alpharemoveiampolicyrequest *GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveIamPolicy: Removes the attached IAM policies for a resource +// +// - resource: The relative resource name of the dataplane resource to remove +// IAM policy, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}/da +// tabases/{database_id} or +// projects/{project_id}/locations/{location_id}/services/{service_id}/databas +// es/{database_id}/tables/{table_id}. +func (r *ProjectsLocationsServicesService) RemoveIamPolicy(resource string, googlecloudmetastorev2alpharemoveiampolicyrequest *GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest) *ProjectsLocationsServicesRemoveIamPolicyCall { + c := &ProjectsLocationsServicesRemoveIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googlecloudmetastorev2alpharemoveiampolicyrequest = googlecloudmetastorev2alpharemoveiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRemoveIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesRemoveIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alpharemoveiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+resource}:removeIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.removeIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse.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 *ProjectsLocationsServicesRemoveIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse, 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 := &GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse{ + 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 +} + +type ProjectsLocationsServicesRestoreCall struct { + s *Service + service string + googlecloudmetastorev2alpharestoreservicerequest *GoogleCloudMetastoreV2alphaRestoreServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a service from a backup. +// +// - service: The relative resource name of the metastore service to run +// restore, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) Restore(service string, googlecloudmetastorev2alpharestoreservicerequest *GoogleCloudMetastoreV2alphaRestoreServiceRequest) *ProjectsLocationsServicesRestoreCall { + c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alpharestoreservicerequest = googlecloudmetastorev2alpharestoreservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alpharestoreservicerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:restore") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.restore" call. +// 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 *ProjectsLocationsServicesRestoreCall) 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 +} + +type ProjectsLocationsServicesStartMigrationCall struct { + s *Service + service string + googlecloudmetastorev2alphastartmigrationrequest *GoogleCloudMetastoreV2alphaStartMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StartMigration: Starts the Managed Migration process. +// +// - service: The relative resource name of the metastore service to start +// migrating to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) StartMigration(service string, googlecloudmetastorev2alphastartmigrationrequest *GoogleCloudMetastoreV2alphaStartMigrationRequest) *ProjectsLocationsServicesStartMigrationCall { + c := &ProjectsLocationsServicesStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphastartmigrationrequest = googlecloudmetastorev2alphastartmigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesStartMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesStartMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesStartMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesStartMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphastartmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:startMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.startMigration" call. +// 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 *ProjectsLocationsServicesStartMigrationCall) 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 +} + +type ProjectsLocationsServicesBackupsCreateCall struct { + s *Service + parent string + googlecloudmetastorev2alphabackup *GoogleCloudMetastoreV2alphaBackup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new backup in a given project and location. +// +// - parent: The relative resource name of the service in which to create a +// backup of the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesBackupsService) Create(parent string, googlecloudmetastorev2alphabackup *GoogleCloudMetastoreV2alphaBackup) *ProjectsLocationsServicesBackupsCreateCall { + c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2alphabackup = googlecloudmetastorev2alphabackup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID of the +// backup, which is used as the final component of the backup's name.This value +// must be between 1 and 64 characters long, begin with a letter, end with a +// letter or number, and consist of alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphabackup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.create" call. +// 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 *ProjectsLocationsServicesBackupsCreateCall) 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 +} + +type ProjectsLocationsServicesBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single backup. +// +// - name: The relative resource name of the backup to delete, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall { + c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.backups.delete" call. +// 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 *ProjectsLocationsServicesBackupsDeleteCall) 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 +} + +type ProjectsLocationsServicesBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single backup. +// +// - name: The relative resource name of the backup to retrieve, in the +// following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall { + c := &ProjectsLocationsServicesBackupsGetCall{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 +// details. +func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2alpha/{+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 "metastore.projects.locations.services.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaBackup.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 *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaBackup, 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 := &GoogleCloudMetastoreV2alphaBackup{ + 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 +} + +type ProjectsLocationsServicesBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists backups in a service. +// +// - parent: The relative resource name of the service whose backups to list, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups. +func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall { + c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// backups to return. The response may contain less than the maximum number. If +// unspecified, no more than 500 backups are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListBackups call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListBackups must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall { + 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 +// details. +func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2alpha/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaListBackupsResponse.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 *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaListBackupsResponse, 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 := &GoogleCloudMetastoreV2alphaListBackupsResponse{ + 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 +} + +// 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 *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2alphaListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsServicesMigrationExecutionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single migration execution. +// +// - name: The relative resource name of the migrationExecution to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Delete(name string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c := &ProjectsLocationsServicesMigrationExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.migrationExecutions.delete" call. +// 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) 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 +} + +type ProjectsLocationsServicesMigrationExecutionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single migration execution. +// +// - name: The relative resource name of the migration execution to retrieve, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Get(name string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c := &ProjectsLocationsServicesMigrationExecutionsGetCall{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 +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2alpha/{+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 "metastore.projects.locations.services.migrationExecutions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaMigrationExecution.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 *ProjectsLocationsServicesMigrationExecutionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaMigrationExecution, 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 := &GoogleCloudMetastoreV2alphaMigrationExecution{ + 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 +} + +type ProjectsLocationsServicesMigrationExecutionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists migration executions on a service. +// +// - parent: The relative resource name of the service whose migration +// executions to list, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions. +func (r *ProjectsLocationsServicesMigrationExecutionsService) List(parent string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c := &ProjectsLocationsServicesMigrationExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Filter(filter string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// migration executions to return. The response may contain less than the +// maximum number. If unspecified, no more than 500 migration executions are +// returned. The maximum value is 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListMigrationExecutions call. Provide this +// token to retrieve the subsequent page.To retrieve the first page, supply an +// empty page token.When paginating, other parameters provided to +// DataprocMetastore.ListMigrationExecutions must match the call that provided +// the page token. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMigrationExecutionsListCall { + 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 +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2alpha/{+parent}/migrationExecutions") + 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 "metastore.projects.locations.services.migrationExecutions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse.ServerResponse.He +// ader 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 *ProjectsLocationsServicesMigrationExecutionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse, 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 := &GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse{ + 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 +} + +// 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 *ProjectsLocationsServicesMigrationExecutionsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} diff --git a/metastore/v2beta/metastore-api.json b/metastore/v2beta/metastore-api.json new file mode 100644 index 00000000000..3dc967a65c4 --- /dev/null +++ b/metastore/v2beta/metastore-api.json @@ -0,0 +1,2313 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://metastore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Dataproc Metastore", + "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "metastore:v2beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://metastore.mtls.googleapis.com/", + "name": "metastore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "services": { + "methods": { + "alterLocation": { + "description": "Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterLocation", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterLocation", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:alterLocation", + "request": { + "$ref": "GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "alterTableProperties": { + "description": "Alter metadata table properties.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterTableProperties", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterTableProperties", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the Dataproc Metastore service that's being used to mutate metadata table properties, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:alterTableProperties", + "request": { + "$ref": "GoogleCloudMetastoreV2betaAlterTablePropertiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "cancelMigration": { + "description": "Cancels the ongoing Managed Migration process.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:cancelMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.cancelMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to cancel the ongoing migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:cancelMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2betaCancelMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "completeMigration": { + "description": "Completes the managed migration process. The Dataproc Metastore service will switch to using its own backend database after successful migration.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:completeMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.completeMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to complete the migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:completeMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2betaCompleteMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a metastore service in a project and location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "serviceId": { + "description": "Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+parent}/services", + "request": { + "$ref": "GoogleCloudMetastoreV2betaService" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportMetadata": { + "description": "Exports metadata from a service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:exportMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.exportMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:exportMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2betaExportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2betaService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importMetadata": { + "description": "Imports Metadata into a Dataproc Metastore service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:importMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.importMetadata", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service to run import, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:importMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2betaImportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists services in a project and location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/services", + "response": { + "$ref": "GoogleCloudMetastoreV2betaListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "moveTableToDatabase": { + "description": "Move a table to another database.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:moveTableToDatabase", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.moveTableToDatabase", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:moveTableToDatabase", + "request": { + "$ref": "GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "request": { + "$ref": "GoogleCloudMetastoreV2betaService" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "queryMetadata": { + "description": "Query Dataproc Metastore metadata.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.queryMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to query metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:queryMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2betaQueryMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeIamPolicy": { + "description": "Removes the attached IAM policies for a resource", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/{servicesId1}:removeIamPolicy", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.removeIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "Required. The relative resource name of the dataplane resource to remove IAM policy, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id} or projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/.*$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+resource}:removeIamPolicy", + "request": { + "$ref": "GoogleCloudMetastoreV2betaRemoveIamPolicyRequest" + }, + "response": { + "$ref": "GoogleCloudMetastoreV2betaRemoveIamPolicyResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a service from a backup.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:restore", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.restore", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run restore, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:restore", + "request": { + "$ref": "GoogleCloudMetastoreV2betaRestoreServiceRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "startMigration": { + "description": "Starts the Managed Migration process.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:startMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.startMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to start migrating to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:startMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2betaStartMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new backup in a given project and location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID of the backup, which is used as the final component of the backup's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service in which to create a backup of the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+parent}/backups", + "request": { + "$ref": "GoogleCloudMetastoreV2betaBackup" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single backup.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single backup.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2betaBackup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists backups in a service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose backups to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/backups", + "response": { + "$ref": "GoogleCloudMetastoreV2betaListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "migrationExecutions": { + "methods": { + "delete": { + "description": "Deletes a single migration execution.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.migrationExecutions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single migration execution.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migration execution to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2betaMigrationExecution" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists migration executions on a service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of migration executions to return. The response may contain less than the maximum number. If unspecified, no more than 500 migration executions are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListMigrationExecutions call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListMigrationExecutions must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose migration executions to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/migrationExecutions", + "response": { + "$ref": "GoogleCloudMetastoreV2betaListMigrationExecutionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20241203", + "rootUrl": "https://metastore.googleapis.com/", + "schemas": { + "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1CustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1CustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1ErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1ErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1HiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1HiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1LocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1LocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1CustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1MultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1HiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1MoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1MoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1MultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1MultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1OperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1QueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1QueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1alphaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1alphaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1alphaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1alphaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1betaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1betaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1betaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1betaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1betaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1betaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest": { + "description": "Request message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest", + "properties": { + "locationUri": { + "description": "Required. The new location URI for the metadata resource.", + "type": "string" + }, + "resourceName": { + "description": "Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaAlterTablePropertiesRequest": { + "description": "Request message for DataprocMetastore.AlterTableProperties.", + "id": "GoogleCloudMetastoreV2betaAlterTablePropertiesRequest", + "properties": { + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that describes the desired values to mutate. If update_mask is empty, the properties will not update. Otherwise, the properties only alters the value whose associated paths exist in the update mask", + "type": "object" + }, + "tableName": { + "description": "Required. The name of the table containing the properties you're altering in the following format.databases/{database_id}/tables/{table_id}", + "type": "string" + }, + "updateMask": { + "description": "A field mask that specifies the metadata table properties that are overwritten by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.For example, given the target properties: properties { a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if the field mask is:paths: \"properties.b\", \"properties.c\"then the result will be: properties { a: 1 b: 3 c: 4 } ", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaAutoscalingConfig": { + "description": "Represents the autoscaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2betaAutoscalingConfig", + "properties": { + "autoscalingEnabled": { + "description": "Optional. Whether or not autoscaling is enabled for this service.", + "type": "boolean" + }, + "autoscalingFactor": { + "description": "Output only. The scaling factor of a service with autoscaling enabled.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "limitConfig": { + "$ref": "GoogleCloudMetastoreV2betaLimitConfig", + "description": "Optional. The LimitConfig of the service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaAuxiliaryVersionConfig": { + "description": "Configuration information for the auxiliary service versions.", + "id": "GoogleCloudMetastoreV2betaAuxiliaryVersionConfig", + "properties": { + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.", + "type": "object" + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the auxiliary metastore service, includes version and region data.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "version": { + "description": "The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaBackup": { + "description": "The details of a backup resource.", + "id": "GoogleCloudMetastoreV2betaBackup", + "properties": { + "createTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the backup.", + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the backup finished creating.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "type": "string" + }, + "restoringServices": { + "description": "Output only. Services that are restoring from the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "serviceRevision": { + "$ref": "GoogleCloudMetastoreV2betaService", + "description": "Output only. The revision of the service at the time of backup.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "DELETING", + "ACTIVE", + "FAILED", + "RESTORING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is being created.", + "The backup is being deleted.", + "The backup is active and ready to use.", + "The backup failed.", + "The backup is being restored." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCancelMigrationRequest": { + "description": "Request message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV2betaCancelMigrationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCdcConfig": { + "description": "Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore.", + "id": "GoogleCloudMetastoreV2betaCdcConfig", + "properties": { + "bucket": { + "description": "Optional. The bucket to write the intermediate stream event data in. The bucket name must be without any prefix like \"gs://\". See the bucket naming requirements (https://cloud.google.com/storage/docs/buckets#naming). This field is optional. If not set, the Artifacts Cloud Storage bucket will be used.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Datastream service should use for the MySQL connection. This field is not returned on request.", + "type": "string" + }, + "reverseProxySubnet": { + "description": "Required. The URL of the subnetwork resource to create the VM instance hosting the reverse proxy in. More context in https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy The subnetwork should reside in the network provided in the request that Datastream will peer to and should be in the same region as Datastream, in the following format. projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "rootPath": { + "description": "Optional. The root path inside the Cloud Storage bucket. The stream event data will be written to this path. The default value is /migration.", + "type": "string" + }, + "subnetIpRange": { + "description": "Required. A /29 CIDR IP range for peering with datastream.", + "type": "string" + }, + "username": { + "description": "Required. The username that the Datastream service should use for the MySQL connection.", + "type": "string" + }, + "vpcNetwork": { + "description": "Required. Fully qualified name of the Cloud SQL instance's VPC network or the shared VPC network that Datastream will peer to, in the following format: projects/{project_id}/locations/global/networks/{network_id}. More context in https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCloudSQLConnectionConfig": { + "description": "Configuration information to establish customer database connection before the cutover phase of migration", + "id": "GoogleCloudMetastoreV2betaCloudSQLConnectionConfig", + "properties": { + "hiveDatabaseName": { + "description": "Required. The hive database name.", + "type": "string" + }, + "instanceConnectionName": { + "description": "Required. Cloud SQL database connection name (project_id:region:instance_name)", + "type": "string" + }, + "ipAddress": { + "description": "Required. The private IP address of the Cloud SQL instance.", + "type": "string" + }, + "natSubnet": { + "description": "Required. The relative resource name of the subnetwork to be used for Private Service Connect. Note that this cannot be a regular subnet and is used only for NAT. (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) This subnet is used to publish the SOCKS5 proxy service. The subnet size must be at least /29 and it should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Dataproc Metastore service will be using to connect to the database. This field is not returned on request.", + "type": "string" + }, + "port": { + "description": "Required. The network port of the database.", + "format": "int32", + "type": "integer" + }, + "proxySubnet": { + "description": "Required. The relative resource name of the subnetwork to deploy the SOCKS5 proxy service in. The subnetwork should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "username": { + "description": "Required. The username that Dataproc Metastore service will use to connect to the database.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCloudSQLMigrationConfig": { + "description": "Configuration information for migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore.", + "id": "GoogleCloudMetastoreV2betaCloudSQLMigrationConfig", + "properties": { + "cdcConfig": { + "$ref": "GoogleCloudMetastoreV2betaCdcConfig", + "description": "Required. Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore. Dataproc Metastore switches to using its backend database after the cutover phase of migration." + }, + "cloudSqlConnectionConfig": { + "$ref": "GoogleCloudMetastoreV2betaCloudSQLConnectionConfig", + "description": "Required. Configuration information to establish customer database connection before the cutover phase of migration" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCompleteMigrationRequest": { + "description": "Request message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV2betaCompleteMigrationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2betaDataCatalogConfig": { + "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.", + "id": "GoogleCloudMetastoreV2betaDataCatalogConfig", + "properties": { + "enabled": { + "description": "Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaDatabaseDump": { + "description": "A specification of the location of and metadata about a database dump from a relational database management system.", + "id": "GoogleCloudMetastoreV2betaDatabaseDump", + "properties": { + "gcsUri": { + "description": "Required. A Cloud Storage object or folder URI that specifies the source from which to import metadata. It must begin with gs://.", + "type": "string" + }, + "type": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaEncryptionConfig": { + "description": "Encryption settings for the service.", + "id": "GoogleCloudMetastoreV2betaEncryptionConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2betaEndpoint": { + "description": "An endpoint used to access the metastore service.", + "id": "GoogleCloudMetastoreV2betaEndpoint", + "properties": { + "endpointUri": { + "description": "Output only. The URI of the endpoint used to access the metastore service.", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. The region where the endpoint is located.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaExportMetadataRequest": { + "description": "Request message for DataprocMetastore.ExportMetadata.", + "id": "GoogleCloudMetastoreV2betaExportMetadataRequest", + "properties": { + "databaseDumpType": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + }, + "destinationGcsFolder": { + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaHiveMetastoreConfig": { + "description": "Specifies configuration information specific to running Hive metastore software as the metastore service.", + "id": "GoogleCloudMetastoreV2betaHiveMetastoreConfig", + "properties": { + "auxiliaryVersions": { + "additionalProperties": { + "$ref": "GoogleCloudMetastoreV2betaAuxiliaryVersionConfig" + }, + "description": "Optional. A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.", + "type": "object" + }, + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.", + "type": "object" + }, + "endpointProtocol": { + "description": "Optional. The protocol to use for the metastore service endpoint. If unspecified, defaults to GRPC.", + "enum": [ + "ENDPOINT_PROTOCOL_UNSPECIFIED", + "THRIFT", + "GRPC" + ], + "enumDescriptions": [ + "The protocol is not set.", + "Use the legacy Apache Thrift protocol for the metastore service endpoint.", + "Use the modernized gRPC protocol for the metastore service endpoint." + ], + "type": "string" + }, + "version": { + "description": "Immutable. The Hive metastore schema version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaImportMetadataRequest": { + "description": "Request message for DataprocMetastore.CreateMetadataImport.", + "id": "GoogleCloudMetastoreV2betaImportMetadataRequest", + "properties": { + "databaseDump": { + "$ref": "GoogleCloudMetastoreV2betaDatabaseDump", + "description": "Immutable. A database dump from a pre-existing metastore's database." + }, + "description": { + "description": "Optional. The description of the metadata import.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaLatestBackup": { + "description": "The details of the latest scheduled backup.", + "id": "GoogleCloudMetastoreV2betaLatestBackup", + "properties": { + "backupId": { + "description": "Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress.", + "readOnly": true, + "type": "string" + }, + "duration": { + "description": "Output only. The duration of the backup completion.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is in progress.", + "The backup completed.", + "The backup failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaLimitConfig": { + "description": "Represents the autoscaling limit configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2betaLimitConfig", + "properties": { + "maxScalingFactor": { + "description": "Optional. The highest scaling factor that the service should be autoscaled to.", + "format": "int32", + "type": "integer" + }, + "minScalingFactor": { + "description": "Optional. The lowest scaling factor that the service should be autoscaled to.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaListBackupsResponse": { + "description": "Response message for DataprocMetastore.ListBackups.", + "id": "GoogleCloudMetastoreV2betaListBackupsResponse", + "properties": { + "backups": { + "description": "The backups of the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaBackup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaListMigrationExecutionsResponse": { + "description": "Response message for DataprocMetastore.ListMigrationExecutions.", + "id": "GoogleCloudMetastoreV2betaListMigrationExecutionsResponse", + "properties": { + "migrationExecutions": { + "description": "The migration executions on the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaMigrationExecution" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaListServicesResponse": { + "description": "Response message for DataprocMetastore.ListServices.", + "id": "GoogleCloudMetastoreV2betaListServicesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "services": { + "description": "The services in the specified location.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaService" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaMetadataIntegration": { + "description": "Specifies how metastore metadata should be integrated with external services.", + "id": "GoogleCloudMetastoreV2betaMetadataIntegration", + "properties": { + "dataCatalogConfig": { + "$ref": "GoogleCloudMetastoreV2betaDataCatalogConfig", + "description": "Optional. The integration config for the Data Catalog service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaMigrationExecution": { + "description": "The details of a migration execution resource.", + "id": "GoogleCloudMetastoreV2betaMigrationExecution", + "properties": { + "cloudSqlMigrationConfig": { + "$ref": "GoogleCloudMetastoreV2betaCloudSQLMigrationConfig", + "description": "Configuration information specific to migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore." + }, + "createTime": { + "description": "Output only. The time when the migration execution was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the migration execution finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The relative resource name of the migration execution, in the following form: projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}", + "readOnly": true, + "type": "string" + }, + "phase": { + "description": "Output only. The current phase of the migration execution.", + "enum": [ + "PHASE_UNSPECIFIED", + "REPLICATION", + "CUTOVER" + ], + "enumDescriptions": [ + "The phase of the migration execution is unknown.", + "Replication phase refers to the migration phase when Dataproc Metastore is running a pipeline to replicate changes in the customer database to its backend database. During this phase, Dataproc Metastore uses the customer database as the hive metastore backend database.", + "Cutover phase refers to the migration phase when Dataproc Metastore switches to using its own backend database. Migration enters this phase when customer is done migrating all their clusters/workloads to Dataproc Metastore and triggers CompleteMigration." + ], + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the migration execution.", + "enum": [ + "STATE_UNSPECIFIED", + "STARTING", + "RUNNING", + "CANCELLING", + "AWAITING_USER_ACTION", + "SUCCEEDED", + "FAILED", + "CANCELLED", + "DELETING" + ], + "enumDescriptions": [ + "The state of the migration execution is unknown.", + "The migration execution is starting.", + "The migration execution is running.", + "The migration execution is in the process of being cancelled.", + "The migration execution is awaiting user action.", + "The migration execution has completed successfully.", + "The migration execution has failed.", + "The migration execution is cancelled.", + "The migration execution is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the migration execution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest": { + "description": "Request message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest", + "properties": { + "dbName": { + "description": "Required. The name of the database where the table resides.", + "type": "string" + }, + "destinationDbName": { + "description": "Required. The name of the database where the table should be moved.", + "type": "string" + }, + "tableName": { + "description": "Required. The name of the table to be moved.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaQueryMetadataRequest": { + "description": "Request message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV2betaQueryMetadataRequest", + "properties": { + "query": { + "description": "Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaRemoveIamPolicyRequest": { + "description": "Request message for DataprocMetastore.RemoveIamPolicy.", + "id": "GoogleCloudMetastoreV2betaRemoveIamPolicyRequest", + "properties": { + "asynchronous": { + "description": "Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaRemoveIamPolicyResponse": { + "description": "Response message for DataprocMetastore.RemoveIamPolicy.", + "id": "GoogleCloudMetastoreV2betaRemoveIamPolicyResponse", + "properties": { + "success": { + "description": "True if the policy is successfully removed.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaRestoreServiceRequest": { + "description": "Request message for DataprocMetastore.Restore.", + "id": "GoogleCloudMetastoreV2betaRestoreServiceRequest", + "properties": { + "backup": { + "description": "Optional. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. Mutually exclusive with backup_location, and exactly one of the two must be set.", + "type": "string" + }, + "backupLocation": { + "description": "Optional. A Cloud Storage URI specifying the location of the backup artifacts, namely - backup avro files under \"avro/\", backup_metastore.json and service.json, in the following form:gs://. Mutually exclusive with backup, and exactly one of the two must be set.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + }, + "restoreType": { + "description": "Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.", + "enum": [ + "RESTORE_TYPE_UNSPECIFIED", + "FULL", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "The restore type is unknown.", + "The service's metadata and configuration are restored.", + "Only the service's metadata is restored." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaScalingConfig": { + "description": "Represents the scaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2betaScalingConfig", + "properties": { + "autoscalingConfig": { + "$ref": "GoogleCloudMetastoreV2betaAutoscalingConfig", + "description": "Optional. The autoscaling configuration." + }, + "scalingFactor": { + "description": "Optional. Scaling factor from 1 to 5, increments of 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaScheduledBackup": { + "description": "This specifies the configuration of scheduled backup.", + "id": "GoogleCloudMetastoreV2betaScheduledBackup", + "properties": { + "backupLocation": { + "description": "Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it.", + "type": "string" + }, + "cronSchedule": { + "description": "Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups.", + "type": "string" + }, + "enabled": { + "description": "Optional. Defines whether the scheduled backup is enabled. The default value is false.", + "type": "boolean" + }, + "latestBackup": { + "$ref": "GoogleCloudMetastoreV2betaLatestBackup", + "description": "Output only. The details of the latest scheduled backup.", + "readOnly": true + }, + "nextScheduledTime": { + "description": "Output only. The time when the next backups execution is scheduled to start.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "timeZone": { + "description": "Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaService": { + "description": "A managed metastore service that serves metadata queries.", + "id": "GoogleCloudMetastoreV2betaService", + "properties": { + "createTime": { + "description": "Output only. The time when the metastore service was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionConfig": { + "$ref": "GoogleCloudMetastoreV2betaEncryptionConfig", + "description": "Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated." + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the metastore service.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "hiveMetastoreConfig": { + "$ref": "GoogleCloudMetastoreV2betaHiveMetastoreConfig", + "description": "Configuration information specific to running Hive metastore software as the metastore service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for the metastore service.", + "type": "object" + }, + "metadataIntegration": { + "$ref": "GoogleCloudMetastoreV2betaMetadataIntegration", + "description": "Optional. The setting that defines how metastore metadata should be integrated with external services and systems." + }, + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "type": "string" + }, + "scalingConfig": { + "$ref": "GoogleCloudMetastoreV2betaScalingConfig", + "description": "Optional. Scaling configuration of the metastore service." + }, + "scheduledBackup": { + "$ref": "GoogleCloudMetastoreV2betaScheduledBackup", + "description": "Optional. The configuration of scheduled backup for the metastore service." + }, + "state": { + "description": "Output only. The current state of the metastore service.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "SUSPENDING", + "SUSPENDED", + "UPDATING", + "DELETING", + "ERROR", + "MIGRATING" + ], + "enumDescriptions": [ + "The state of the metastore service is unknown.", + "The metastore service is in the process of being created.", + "The metastore service is running and ready to serve queries.", + "The metastore service is entering suspension. Its query-serving availability may cease unexpectedly.", + "The metastore service is suspended and unable to serve queries.", + "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", + "The metastore service is undergoing deletion. It cannot be used.", + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted.", + "The metastore service is processing a managed migration." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the metastore service, if available.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The globally unique resource identifier of the metastore service.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metastore service was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "warehouseGcsUri": { + "description": "Required. A Cloud Storage URI (starting with gs://) that specifies the default warehouse directory of the Hive Metastore.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaStartMigrationRequest": { + "description": "Request message for DataprocMetastore.StartMigration.", + "id": "GoogleCloudMetastoreV2betaStartMigrationRequest", + "properties": { + "migrationExecution": { + "$ref": "GoogleCloudMetastoreV2betaMigrationExecution", + "description": "Required. The configuration details for the migration." + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Dataproc Metastore API", + "version": "v2beta", + "version_module": true +} \ No newline at end of file diff --git a/metastore/v2beta/metastore-gen.go b/metastore/v2beta/metastore-gen.go new file mode 100644 index 00000000000..4dec99e2ec5 --- /dev/null +++ b/metastore/v2beta/metastore-gen.go @@ -0,0 +1,4855 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package metastore provides access to the Dataproc Metastore API. +// +// For product documentation, see: https://cloud.google.com/dataproc-metastore/docs +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/metastore/v2beta" +// ... +// ctx := context.Background() +// metastoreService, err := metastore.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package metastore // import "google.golang.org/api/metastore/v2beta" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "metastore:v2beta" +const apiName = "metastore" +const apiVersion = "v2beta" +const basePath = "https://metastore.googleapis.com/" +const basePathTemplate = "https://metastore.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://metastore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Services = NewProjectsLocationsServicesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Services *ProjectsLocationsServicesService +} + +func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService { + rs := &ProjectsLocationsServicesService{s: s} + rs.Backups = NewProjectsLocationsServicesBackupsService(s) + rs.MigrationExecutions = NewProjectsLocationsServicesMigrationExecutionsService(s) + return rs +} + +type ProjectsLocationsServicesService struct { + s *Service + + Backups *ProjectsLocationsServicesBackupsService + + MigrationExecutions *ProjectsLocationsServicesMigrationExecutionsService +} + +func NewProjectsLocationsServicesBackupsService(s *Service) *ProjectsLocationsServicesBackupsService { + rs := &ProjectsLocationsServicesBackupsService{s: s} + return rs +} + +type ProjectsLocationsServicesBackupsService struct { + s *Service +} + +func NewProjectsLocationsServicesMigrationExecutionsService(s *Service) *ProjectsLocationsServicesMigrationExecutionsService { + rs := &ProjectsLocationsServicesMigrationExecutionsService{s: s} + return rs +} + +type ProjectsLocationsServicesMigrationExecutionsService struct { + s *Service +} + +// GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1CustomRegionMetadata: Metadata about a custom region. +// This is only populated if the region is a custom region. For single/multi +// regions, it will be empty. +type GoogleCloudMetastoreV1CustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1CustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1CustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1ErrorDetails: Error details in public error message +// for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1ErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1ErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1ErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1HiveMetastoreVersion: A specification of a supported +// version of the Hive Metastore software. +type GoogleCloudMetastoreV1HiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1HiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1HiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1LocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1LocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1CustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1MultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1MoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1MoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1MultiRegionMetadata: The metadata for the multi-region +// that includes the constituent regions. The metadata is only populated if the +// region is multi-region. For single region or custom dual region, it will be +// empty. +type GoogleCloudMetastoreV1MultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1MultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1MultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1OperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1QueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1QueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1QueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1QueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1alphaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1alphaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1alphaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1alphaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1alphaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1alphaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1alphaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1alphaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1alphaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1alphaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1alphaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1alphaOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1betaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1betaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1betaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1betaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1betaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1betaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1betaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1betaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1betaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1betaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1betaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1betaOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest: Request +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest struct { + // LocationUri: Required. The new location URI for the metadata resource. + LocationUri string `json:"locationUri,omitempty"` + // ResourceName: Required. The relative metadata resource name in the following + // format.databases/{database_id} or databases/{database_id}/tables/{table_id} + // or databases/{database_id}/tables/{table_id}/partitions/{partition_id} + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "LocationUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocationUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaAlterTablePropertiesRequest: Request message for +// DataprocMetastore.AlterTableProperties. +type GoogleCloudMetastoreV2betaAlterTablePropertiesRequest struct { + // Properties: A map that describes the desired values to mutate. If + // update_mask is empty, the properties will not update. Otherwise, the + // properties only alters the value whose associated paths exist in the update + // mask + Properties map[string]string `json:"properties,omitempty"` + // TableName: Required. The name of the table containing the properties you're + // altering in the following format.databases/{database_id}/tables/{table_id} + TableName string `json:"tableName,omitempty"` + // UpdateMask: A field mask that specifies the metadata table properties that + // are overwritten by the update. Fields specified in the update_mask are + // relative to the resource (not to the full request). A field is overwritten + // if it is in the mask.For example, given the target properties: properties { + // a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if + // the field mask is:paths: "properties.b", "properties.c"then the result will + // be: properties { a: 1 b: 3 c: 4 } + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Properties") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Properties") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaAlterTablePropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaAlterTablePropertiesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaAutoscalingConfig: Represents the autoscaling +// configuration of a metastore service. +type GoogleCloudMetastoreV2betaAutoscalingConfig struct { + // AutoscalingEnabled: Optional. Whether or not autoscaling is enabled for this + // service. + AutoscalingEnabled bool `json:"autoscalingEnabled,omitempty"` + // AutoscalingFactor: Output only. The scaling factor of a service with + // autoscaling enabled. + AutoscalingFactor int64 `json:"autoscalingFactor,omitempty"` + // LimitConfig: Optional. The LimitConfig of the service. + LimitConfig *GoogleCloudMetastoreV2betaLimitConfig `json:"limitConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaAutoscalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaAutoscalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaAuxiliaryVersionConfig: Configuration information +// for the auxiliary service versions. +type GoogleCloudMetastoreV2betaAuxiliaryVersionConfig struct { + // ConfigOverrides: A mapping of Hive metastore configuration key-value pairs + // to apply to the auxiliary Hive metastore (configured in hive-site.xml) in + // addition to the primary version's overrides. If keys are present in both the + // auxiliary version's overrides and the primary version's overrides, the value + // from the auxiliary version's overrides takes precedence. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the auxiliary + // metastore service, includes version and region data. + Endpoints []*GoogleCloudMetastoreV2betaEndpoint `json:"endpoints,omitempty"` + // Version: The Hive metastore version of the auxiliary service. It must be + // less than the primary Hive metastore service's version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfigOverrides") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaAuxiliaryVersionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaAuxiliaryVersionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaBackup: The details of a backup resource. +type GoogleCloudMetastoreV2betaBackup struct { + // CreateTime: Output only. The time when the backup was started. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the backup. + Description string `json:"description,omitempty"` + // EndTime: Output only. The time when the backup finished creating. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. The relative resource name of the backup, in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // backups/{backup_id} + Name string `json:"name,omitempty"` + // RestoringServices: Output only. Services that are restoring from the backup. + RestoringServices []string `json:"restoringServices,omitempty"` + // ServiceRevision: Output only. The revision of the service at the time of + // backup. + ServiceRevision *GoogleCloudMetastoreV2betaService `json:"serviceRevision,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "CREATING" - The backup is being created. + // "DELETING" - The backup is being deleted. + // "ACTIVE" - The backup is active and ready to use. + // "FAILED" - The backup failed. + // "RESTORING" - The backup is being restored. + 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. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaCancelMigrationRequest: Request message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV2betaCancelMigrationRequest struct { +} + +// GoogleCloudMetastoreV2betaCdcConfig: Configuration information to start the +// Change Data Capture (CDC) streams from customer database to backend database +// of Dataproc Metastore. +type GoogleCloudMetastoreV2betaCdcConfig struct { + // Bucket: Optional. The bucket to write the intermediate stream event data in. + // The bucket name must be without any prefix like "gs://". See the bucket + // naming requirements (https://cloud.google.com/storage/docs/buckets#naming). + // This field is optional. If not set, the Artifacts Cloud Storage bucket will + // be used. + Bucket string `json:"bucket,omitempty"` + // Password: Required. Input only. The password for the user that Datastream + // service should use for the MySQL connection. This field is not returned on + // request. + Password string `json:"password,omitempty"` + // ReverseProxySubnet: Required. The URL of the subnetwork resource to create + // the VM instance hosting the reverse proxy in. More context in + // https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy + // The subnetwork should reside in the network provided in the request that + // Datastream will peer to and should be in the same region as Datastream, in + // the following format. + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ReverseProxySubnet string `json:"reverseProxySubnet,omitempty"` + // RootPath: Optional. The root path inside the Cloud Storage bucket. The + // stream event data will be written to this path. The default value is + // /migration. + RootPath string `json:"rootPath,omitempty"` + // SubnetIpRange: Required. A /29 CIDR IP range for peering with datastream. + SubnetIpRange string `json:"subnetIpRange,omitempty"` + // Username: Required. The username that the Datastream service should use for + // the MySQL connection. + Username string `json:"username,omitempty"` + // VpcNetwork: Required. Fully qualified name of the Cloud SQL instance's VPC + // network or the shared VPC network that Datastream will peer to, in the + // following format: + // projects/{project_id}/locations/global/networks/{network_id}. More context + // in + // https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity + VpcNetwork string `json:"vpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaCdcConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaCdcConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaCloudSQLConnectionConfig: Configuration +// information to establish customer database connection before the cutover +// phase of migration +type GoogleCloudMetastoreV2betaCloudSQLConnectionConfig struct { + // HiveDatabaseName: Required. The hive database name. + HiveDatabaseName string `json:"hiveDatabaseName,omitempty"` + // InstanceConnectionName: Required. Cloud SQL database connection name + // (project_id:region:instance_name) + InstanceConnectionName string `json:"instanceConnectionName,omitempty"` + // IpAddress: Required. The private IP address of the Cloud SQL instance. + IpAddress string `json:"ipAddress,omitempty"` + // NatSubnet: Required. The relative resource name of the subnetwork to be used + // for Private Service Connect. Note that this cannot be a regular subnet and + // is used only for NAT. + // (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) + // This subnet is used to publish the SOCKS5 proxy service. The subnet size + // must be at least /29 and it should reside in a network through which the + // Cloud SQL instance is accessible. The resource name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + NatSubnet string `json:"natSubnet,omitempty"` + // Password: Required. Input only. The password for the user that Dataproc + // Metastore service will be using to connect to the database. This field is + // not returned on request. + Password string `json:"password,omitempty"` + // Port: Required. The network port of the database. + Port int64 `json:"port,omitempty"` + // ProxySubnet: Required. The relative resource name of the subnetwork to + // deploy the SOCKS5 proxy service in. The subnetwork should reside in a + // network through which the Cloud SQL instance is accessible. The resource + // name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ProxySubnet string `json:"proxySubnet,omitempty"` + // Username: Required. The username that Dataproc Metastore service will use to + // connect to the database. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "HiveDatabaseName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HiveDatabaseName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaCloudSQLConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaCloudSQLConnectionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaCloudSQLMigrationConfig: Configuration information +// for migrating from self-managed hive metastore on Google Cloud using Cloud +// SQL as the backend database to Dataproc Metastore. +type GoogleCloudMetastoreV2betaCloudSQLMigrationConfig struct { + // CdcConfig: Required. Configuration information to start the Change Data + // Capture (CDC) streams from customer database to backend database of Dataproc + // Metastore. Dataproc Metastore switches to using its backend database after + // the cutover phase of migration. + CdcConfig *GoogleCloudMetastoreV2betaCdcConfig `json:"cdcConfig,omitempty"` + // CloudSqlConnectionConfig: Required. Configuration information to establish + // customer database connection before the cutover phase of migration + CloudSqlConnectionConfig *GoogleCloudMetastoreV2betaCloudSQLConnectionConfig `json:"cloudSqlConnectionConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "CdcConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CdcConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaCloudSQLMigrationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaCloudSQLMigrationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaCompleteMigrationRequest: Request message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV2betaCompleteMigrationRequest struct { +} + +// GoogleCloudMetastoreV2betaDataCatalogConfig: Specifies how metastore +// metadata should be integrated with the Data Catalog service. +type GoogleCloudMetastoreV2betaDataCatalogConfig struct { + // Enabled: Optional. Defines whether the metastore metadata should be synced + // to Data Catalog. The default value is to disable syncing metastore metadata + // to Data Catalog. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaDataCatalogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaDataCatalogConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaDatabaseDump: A specification of the location of +// and metadata about a database dump from a relational database management +// system. +type GoogleCloudMetastoreV2betaDatabaseDump struct { + // GcsUri: Required. A Cloud Storage object or folder URI that specifies the + // source from which to import metadata. It must begin with gs://. + GcsUri string `json:"gcsUri,omitempty"` + // Type: Optional. The type of the database dump. If unspecified, defaults to + // MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaDatabaseDump) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaDatabaseDump + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaEncryptionConfig: Encryption settings for the +// service. +type GoogleCloudMetastoreV2betaEncryptionConfig struct { +} + +// GoogleCloudMetastoreV2betaEndpoint: An endpoint used to access the metastore +// service. +type GoogleCloudMetastoreV2betaEndpoint struct { + // EndpointUri: Output only. The URI of the endpoint used to access the + // metastore service. + EndpointUri string `json:"endpointUri,omitempty"` + // Region: Output only. The region where the endpoint is located. + Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndpointUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaEndpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaExportMetadataRequest: Request message for +// DataprocMetastore.ExportMetadata. +type GoogleCloudMetastoreV2betaExportMetadataRequest struct { + // DatabaseDumpType: Optional. The type of the database dump. If unspecified, + // defaults to MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + DatabaseDumpType string `json:"databaseDumpType,omitempty"` + // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///. + // A sub-folder containing exported files will be created below it. + DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaExportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaExportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaHiveMetastoreConfig: Specifies configuration +// information specific to running Hive metastore software as the metastore +// service. +type GoogleCloudMetastoreV2betaHiveMetastoreConfig struct { + // AuxiliaryVersions: Optional. A mapping of Hive metastore version to the + // auxiliary version configuration. When specified, a secondary Hive metastore + // service is created along with the primary service. All auxiliary versions + // must be less than the service's primary version. The key is the auxiliary + // service name and it must match the regular expression a-z?. This means that + // the first character must be a lowercase letter, and all the following + // characters must be hyphens, lowercase letters, or digits, except the last + // character, which cannot be a hyphen. + AuxiliaryVersions map[string]GoogleCloudMetastoreV2betaAuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"` + // ConfigOverrides: Optional. A mapping of Hive metastore configuration + // key-value pairs to apply to the Hive metastore (configured in + // hive-site.xml). The mappings override system defaults (some keys cannot be + // overridden). These overrides are also applied to auxiliary versions and can + // be further customized in the auxiliary version's AuxiliaryVersionConfig. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // EndpointProtocol: Optional. The protocol to use for the metastore service + // endpoint. If unspecified, defaults to GRPC. + // + // Possible values: + // "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set. + // "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service + // endpoint. + // "GRPC" - Use the modernized gRPC protocol for the metastore service + // endpoint. + EndpointProtocol string `json:"endpointProtocol,omitempty"` + // Version: Immutable. The Hive metastore schema version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaHiveMetastoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaHiveMetastoreConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaImportMetadataRequest: Request message for +// DataprocMetastore.CreateMetadataImport. +type GoogleCloudMetastoreV2betaImportMetadataRequest struct { + // DatabaseDump: Immutable. A database dump from a pre-existing metastore's + // database. + DatabaseDump *GoogleCloudMetastoreV2betaDatabaseDump `json:"databaseDump,omitempty"` + // Description: Optional. The description of the metadata import. + Description string `json:"description,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDump") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDump") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaImportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaImportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaLatestBackup: The details of the latest scheduled +// backup. +type GoogleCloudMetastoreV2betaLatestBackup struct { + // BackupId: Output only. The ID of an in-progress scheduled backup. Empty if + // no backup is in progress. + BackupId string `json:"backupId,omitempty"` + // Duration: Output only. The duration of the backup completion. + Duration string `json:"duration,omitempty"` + // StartTime: Output only. The time when the backup was started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "IN_PROGRESS" - The backup is in progress. + // "SUCCEEDED" - The backup completed. + // "FAILED" - The backup failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaLatestBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaLatestBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaLimitConfig: Represents the autoscaling limit +// configuration of a metastore service. +type GoogleCloudMetastoreV2betaLimitConfig struct { + // MaxScalingFactor: Optional. The highest scaling factor that the service + // should be autoscaled to. + MaxScalingFactor int64 `json:"maxScalingFactor,omitempty"` + // MinScalingFactor: Optional. The lowest scaling factor that the service + // should be autoscaled to. + MinScalingFactor int64 `json:"minScalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxScalingFactor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxScalingFactor") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaLimitConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaLimitConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaListBackupsResponse: Response message for +// DataprocMetastore.ListBackups. +type GoogleCloudMetastoreV2betaListBackupsResponse struct { + // Backups: The backups of the specified service. + Backups []*GoogleCloudMetastoreV2betaBackup `json:"backups,omitempty"` + // NextPageToken: A token that can be sent as page_token to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaListMigrationExecutionsResponse: Response message +// for DataprocMetastore.ListMigrationExecutions. +type GoogleCloudMetastoreV2betaListMigrationExecutionsResponse struct { + // MigrationExecutions: The migration executions on the specified service. + MigrationExecutions []*GoogleCloudMetastoreV2betaMigrationExecution `json:"migrationExecutions,omitempty"` + // NextPageToken: A token that can be sent as page_token to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "MigrationExecutions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecutions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaListMigrationExecutionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaListMigrationExecutionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaListServicesResponse: Response message for +// DataprocMetastore.ListServices. +type GoogleCloudMetastoreV2betaListServicesResponse struct { + // NextPageToken: A token that can be sent as page_token to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Services: The services in the specified location. + Services []*GoogleCloudMetastoreV2betaService `json:"services,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaListServicesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaMetadataIntegration: Specifies how metastore +// metadata should be integrated with external services. +type GoogleCloudMetastoreV2betaMetadataIntegration struct { + // DataCatalogConfig: Optional. The integration config for the Data Catalog + // service. + DataCatalogConfig *GoogleCloudMetastoreV2betaDataCatalogConfig `json:"dataCatalogConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataCatalogConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaMetadataIntegration) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaMetadataIntegration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaMigrationExecution: The details of a migration +// execution resource. +type GoogleCloudMetastoreV2betaMigrationExecution struct { + // CloudSqlMigrationConfig: Configuration information specific to migrating + // from self-managed hive metastore on Google Cloud using Cloud SQL as the + // backend database to Dataproc Metastore. + CloudSqlMigrationConfig *GoogleCloudMetastoreV2betaCloudSQLMigrationConfig `json:"cloudSqlMigrationConfig,omitempty"` + // CreateTime: Output only. The time when the migration execution was started. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time when the migration execution finished. + EndTime string `json:"endTime,omitempty"` + // Name: Output only. The relative resource name of the migration execution, in + // the following form: + // projects/{project_number}/locations/{location_id}/services/{service_id}/migra + // tionExecutions/{migration_execution_id} + Name string `json:"name,omitempty"` + // Phase: Output only. The current phase of the migration execution. + // + // Possible values: + // "PHASE_UNSPECIFIED" - The phase of the migration execution is unknown. + // "REPLICATION" - Replication phase refers to the migration phase when + // Dataproc Metastore is running a pipeline to replicate changes in the + // customer database to its backend database. During this phase, Dataproc + // Metastore uses the customer database as the hive metastore backend database. + // "CUTOVER" - Cutover phase refers to the migration phase when Dataproc + // Metastore switches to using its own backend database. Migration enters this + // phase when customer is done migrating all their clusters/workloads to + // Dataproc Metastore and triggers CompleteMigration. + Phase string `json:"phase,omitempty"` + // State: Output only. The current state of the migration execution. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the migration execution is unknown. + // "STARTING" - The migration execution is starting. + // "RUNNING" - The migration execution is running. + // "CANCELLING" - The migration execution is in the process of being + // cancelled. + // "AWAITING_USER_ACTION" - The migration execution is awaiting user action. + // "SUCCEEDED" - The migration execution has completed successfully. + // "FAILED" - The migration execution has failed. + // "CANCELLED" - The migration execution is cancelled. + // "DELETING" - The migration execution is being deleted. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the migration execution. + StateMessage string `json:"stateMessage,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaMigrationExecution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaMigrationExecution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest: Request message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest struct { + // DbName: Required. The name of the database where the table resides. + DbName string `json:"dbName,omitempty"` + // DestinationDbName: Required. The name of the database where the table should + // be moved. + DestinationDbName string `json:"destinationDbName,omitempty"` + // TableName: Required. The name of the table to be moved. + TableName string `json:"tableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbName") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaQueryMetadataRequest: Request message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV2betaQueryMetadataRequest struct { + // Query: Required. A read-only SQL query to execute against the metadata + // database. The query cannot change or mutate the data. + Query string `json:"query,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaQueryMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaQueryMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaRemoveIamPolicyRequest: Request message for +// DataprocMetastore.RemoveIamPolicy. +type GoogleCloudMetastoreV2betaRemoveIamPolicyRequest struct { + // Asynchronous: Optional. Removes IAM policy attached to database or table + // asynchronously when it is set. The default is false. + Asynchronous bool `json:"asynchronous,omitempty"` + // ForceSendFields is a list of field names (e.g. "Asynchronous") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Asynchronous") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaRemoveIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaRemoveIamPolicyRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaRemoveIamPolicyResponse: Response message for +// DataprocMetastore.RemoveIamPolicy. +type GoogleCloudMetastoreV2betaRemoveIamPolicyResponse struct { + // Success: True if the policy is successfully removed. + Success bool `json:"success,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Success") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Success") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaRemoveIamPolicyResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaRemoveIamPolicyResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaRestoreServiceRequest: Request message for +// DataprocMetastore.Restore. +type GoogleCloudMetastoreV2betaRestoreServiceRequest struct { + // Backup: Optional. The relative resource name of the metastore service backup + // to restore from, in the following + // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back + // ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of + // the two must be set. + Backup string `json:"backup,omitempty"` + // BackupLocation: Optional. A Cloud Storage URI specifying the location of the + // backup artifacts, namely - backup avro files under "avro/", + // backup_metastore.json and service.json, in the following form:gs://. + // Mutually exclusive with backup, and exactly one of the two must be set. + BackupLocation string `json:"backupLocation,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // RestoreType: Optional. The type of restore. If unspecified, defaults to + // METADATA_ONLY. + // + // Possible values: + // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown. + // "FULL" - The service's metadata and configuration are restored. + // "METADATA_ONLY" - Only the service's metadata is restored. + RestoreType string `json:"restoreType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaRestoreServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaRestoreServiceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaScalingConfig: Represents the scaling +// configuration of a metastore service. +type GoogleCloudMetastoreV2betaScalingConfig struct { + // AutoscalingConfig: Optional. The autoscaling configuration. + AutoscalingConfig *GoogleCloudMetastoreV2betaAutoscalingConfig `json:"autoscalingConfig,omitempty"` + // ScalingFactor: Optional. Scaling factor from 1 to 5, increments of 1. + ScalingFactor int64 `json:"scalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaScalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaScalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaScheduledBackup: This specifies the configuration +// of scheduled backup. +type GoogleCloudMetastoreV2betaScheduledBackup struct { + // BackupLocation: Optional. A Cloud Storage URI of a folder, in the format + // gs:///. A sub-folder containing backup files will be stored below it. + BackupLocation string `json:"backupLocation,omitempty"` + // CronSchedule: Optional. The scheduled interval in Cron format, see + // https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is + // not enabled. Must be specified to enable scheduled backups. + CronSchedule string `json:"cronSchedule,omitempty"` + // Enabled: Optional. Defines whether the scheduled backup is enabled. The + // default value is false. + Enabled bool `json:"enabled,omitempty"` + // LatestBackup: Output only. The details of the latest scheduled backup. + LatestBackup *GoogleCloudMetastoreV2betaLatestBackup `json:"latestBackup,omitempty"` + // NextScheduledTime: Output only. The time when the next backups execution is + // scheduled to start. + NextScheduledTime string `json:"nextScheduledTime,omitempty"` + // TimeZone: Optional. Specifies the time zone to be used when interpreting + // cron_schedule. Must be a time zone name from the time zone database + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. + // America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is + // UTC. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaScheduledBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaScheduledBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaService: A managed metastore service that serves +// metadata queries. +type GoogleCloudMetastoreV2betaService struct { + // CreateTime: Output only. The time when the metastore service was created. + CreateTime string `json:"createTime,omitempty"` + // EncryptionConfig: Immutable. Information used to configure the Dataproc + // Metastore service to encrypt customer data at rest. Cannot be updated. + EncryptionConfig *GoogleCloudMetastoreV2betaEncryptionConfig `json:"encryptionConfig,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the metastore + // service. + Endpoints []*GoogleCloudMetastoreV2betaEndpoint `json:"endpoints,omitempty"` + // HiveMetastoreConfig: Configuration information specific to running Hive + // metastore software as the metastore service. + HiveMetastoreConfig *GoogleCloudMetastoreV2betaHiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"` + // Labels: User-defined labels for the metastore service. + Labels map[string]string `json:"labels,omitempty"` + // MetadataIntegration: Optional. The setting that defines how metastore + // metadata should be integrated with external services and systems. + MetadataIntegration *GoogleCloudMetastoreV2betaMetadataIntegration `json:"metadataIntegration,omitempty"` + // Name: Immutable. The relative resource name of the metastore service, in the + // following + // format:projects/{project_number}/locations/{location_id}/services/{service_id + // }. + Name string `json:"name,omitempty"` + // ScalingConfig: Optional. Scaling configuration of the metastore service. + ScalingConfig *GoogleCloudMetastoreV2betaScalingConfig `json:"scalingConfig,omitempty"` + // ScheduledBackup: Optional. The configuration of scheduled backup for the + // metastore service. + ScheduledBackup *GoogleCloudMetastoreV2betaScheduledBackup `json:"scheduledBackup,omitempty"` + // State: Output only. The current state of the metastore service. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metastore service is unknown. + // "CREATING" - The metastore service is in the process of being created. + // "ACTIVE" - The metastore service is running and ready to serve queries. + // "SUSPENDING" - The metastore service is entering suspension. Its + // query-serving availability may cease unexpectedly. + // "SUSPENDED" - The metastore service is suspended and unable to serve + // queries. + // "UPDATING" - The metastore service is being updated. It remains usable but + // cannot accept additional update requests or be deleted at this time. + // "DELETING" - The metastore service is undergoing deletion. It cannot be + // used. + // "ERROR" - The metastore service has encountered an error and cannot be + // used. The metastore service should be deleted. + // "MIGRATING" - The metastore service is processing a managed migration. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the metastore service, if available. + StateMessage string `json:"stateMessage,omitempty"` + // Uid: Output only. The globally unique resource identifier of the metastore + // service. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The time when the metastore service was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // WarehouseGcsUri: Required. A Cloud Storage URI (starting with gs://) that + // specifies the default warehouse directory of the Hive Metastore. + WarehouseGcsUri string `json:"warehouseGcsUri,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaService) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaService + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaStartMigrationRequest: Request message for +// DataprocMetastore.StartMigration. +type GoogleCloudMetastoreV2betaStartMigrationRequest struct { + // MigrationExecution: Required. The configuration details for the migration. + MigrationExecution *GoogleCloudMetastoreV2betaMigrationExecution `json:"migrationExecution,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaStartMigrationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaStartMigrationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is false, it means the operation is still in progress. If + // true, the operation is completed, and either error or response is available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the name + // should be a resource name ending with operations/{unique_id}. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as Delete, the response is + // google.protobuf.Empty. If the original method is standard Get/Create/Update, + // the response should be the resource. For other methods, the response should + // have the type XxxResponse, where Xxx is the original method name. For + // example, if the original method name is TakeSnapshot(), the inferred + // response type is TakeSnapshotResponse. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleRpcStatus: The Status type defines a logical error model that is +// suitable for different programming environments, including REST APIs and RPC +// APIs. It is used by gRPC (https://github.com/grpc). Each Status message +// contains three pieces of data: error code, error message, and error +// details.You can find out more about this error model and how to work with it +// in the API Design Guide (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsServicesAlterLocationCall struct { + s *Service + service string + googlecloudmetastorev2betaaltermetadataresourcelocationrequest *GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterLocation: Alter metadata resource location. The metadata resource can +// be a database, table, or partition. This functionality only updates the +// parent directory for the respective metadata resource and does not transfer +// any existing data to the new location. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterLocation(service string, googlecloudmetastorev2betaaltermetadataresourcelocationrequest *GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall { + c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betaaltermetadataresourcelocationrequest = googlecloudmetastorev2betaaltermetadataresourcelocationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaaltermetadataresourcelocationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:alterLocation") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterLocation" call. +// 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 *ProjectsLocationsServicesAlterLocationCall) 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 +} + +type ProjectsLocationsServicesAlterTablePropertiesCall struct { + s *Service + service string + googlecloudmetastorev2betaaltertablepropertiesrequest *GoogleCloudMetastoreV2betaAlterTablePropertiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterTableProperties: Alter metadata table properties. +// +// - service: The relative resource name of the Dataproc Metastore service +// that's being used to mutate metadata table properties, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, googlecloudmetastorev2betaaltertablepropertiesrequest *GoogleCloudMetastoreV2betaAlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall { + c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betaaltertablepropertiesrequest = googlecloudmetastorev2betaaltertablepropertiesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaaltertablepropertiesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:alterTableProperties") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterTableProperties" call. +// 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 *ProjectsLocationsServicesAlterTablePropertiesCall) 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 +} + +type ProjectsLocationsServicesCancelMigrationCall struct { + s *Service + service string + googlecloudmetastorev2betacancelmigrationrequest *GoogleCloudMetastoreV2betaCancelMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CancelMigration: Cancels the ongoing Managed Migration process. +// +// - service: The relative resource name of the metastore service to cancel the +// ongoing migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CancelMigration(service string, googlecloudmetastorev2betacancelmigrationrequest *GoogleCloudMetastoreV2betaCancelMigrationRequest) *ProjectsLocationsServicesCancelMigrationCall { + c := &ProjectsLocationsServicesCancelMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betacancelmigrationrequest = googlecloudmetastorev2betacancelmigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCancelMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCancelMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCancelMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCancelMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCancelMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCancelMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betacancelmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:cancelMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.cancelMigration" call. +// 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 *ProjectsLocationsServicesCancelMigrationCall) 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 +} + +type ProjectsLocationsServicesCompleteMigrationCall struct { + s *Service + service string + googlecloudmetastorev2betacompletemigrationrequest *GoogleCloudMetastoreV2betaCompleteMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CompleteMigration: Completes the managed migration process. The Dataproc +// Metastore service will switch to using its own backend database after +// successful migration. +// +// - service: The relative resource name of the metastore service to complete +// the migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CompleteMigration(service string, googlecloudmetastorev2betacompletemigrationrequest *GoogleCloudMetastoreV2betaCompleteMigrationRequest) *ProjectsLocationsServicesCompleteMigrationCall { + c := &ProjectsLocationsServicesCompleteMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betacompletemigrationrequest = googlecloudmetastorev2betacompletemigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCompleteMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCompleteMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCompleteMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betacompletemigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:completeMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.completeMigration" call. +// 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 *ProjectsLocationsServicesCompleteMigrationCall) 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 +} + +type ProjectsLocationsServicesCreateCall struct { + s *Service + parent string + googlecloudmetastorev2betaservice *GoogleCloudMetastoreV2betaService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore service in a project and location. +// +// - parent: The relative resource name of the location in which to create a +// metastore service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) Create(parent string, googlecloudmetastorev2betaservice *GoogleCloudMetastoreV2betaService) *ProjectsLocationsServicesCreateCall { + c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2betaservice = googlecloudmetastorev2betaservice + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The ID of the +// metastore service, which is used as the final component of the metastore +// service's name.This value must be between 2 and 63 characters long +// inclusive, begin with a letter, end with a letter or number, and consist of +// alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/services") + 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 "metastore.projects.locations.services.create" call. +// 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 *ProjectsLocationsServicesCreateCall) 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 +} + +type ProjectsLocationsServicesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single service. +// +// - name: The relative resource name of the metastore service to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { + c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.delete" call. +// 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 *ProjectsLocationsServicesDeleteCall) 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 +} + +type ProjectsLocationsServicesExportMetadataCall struct { + s *Service + service string + googlecloudmetastorev2betaexportmetadatarequest *GoogleCloudMetastoreV2betaExportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportMetadata: Exports metadata from a service. +// +// - service: The relative resource name of the metastore service to run +// export, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ExportMetadata(service string, googlecloudmetastorev2betaexportmetadatarequest *GoogleCloudMetastoreV2betaExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall { + c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betaexportmetadatarequest = googlecloudmetastorev2betaexportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaexportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:exportMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.exportMetadata" call. +// 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 *ProjectsLocationsServicesExportMetadataCall) 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 +} + +type ProjectsLocationsServicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single service. +// +// - name: The relative resource name of the metastore service to retrieve, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall { + c := &ProjectsLocationsServicesGetCall{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 +// details. +func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+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 "metastore.projects.locations.services.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaService.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 *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaService, 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 := &GoogleCloudMetastoreV2betaService{ + 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 +} + +type ProjectsLocationsServicesImportMetadataCall struct { + s *Service + name string + googlecloudmetastorev2betaimportmetadatarequest *GoogleCloudMetastoreV2betaImportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportMetadata: Imports Metadata into a Dataproc Metastore service. +// +// - name: Immutable. The relative resource name of the metastore service to +// run import, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ImportMetadata(name string, googlecloudmetastorev2betaimportmetadatarequest *GoogleCloudMetastoreV2betaImportMetadataRequest) *ProjectsLocationsServicesImportMetadataCall { + c := &ProjectsLocationsServicesImportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2betaimportmetadatarequest = googlecloudmetastorev2betaimportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesImportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesImportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesImportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesImportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesImportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesImportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaimportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:importMetadata") + 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 "metastore.projects.locations.services.importMetadata" call. +// 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 *ProjectsLocationsServicesImportMetadataCall) 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 +} + +type ProjectsLocationsServicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists services in a project and location. +// +// - parent: The relative resource name of the location of metastore services +// to list, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall { + c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// services to return. The response may contain less than the maximum number. +// If unspecified, no more than 500 services are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListServices call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListServices must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall { + 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 +// details. +func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+parent}/services") + 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 "metastore.projects.locations.services.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaListServicesResponse.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 *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaListServicesResponse, 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 := &GoogleCloudMetastoreV2betaListServicesResponse{ + 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 +} + +// 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 *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2betaListServicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsServicesMoveTableToDatabaseCall struct { + s *Service + service string + googlecloudmetastorev2betamovetabletodatabaserequest *GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MoveTableToDatabase: Move a table to another database. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, googlecloudmetastorev2betamovetabletodatabaserequest *GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betamovetabletodatabaserequest = googlecloudmetastorev2betamovetabletodatabaserequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betamovetabletodatabaserequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:moveTableToDatabase") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.moveTableToDatabase" call. +// 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 *ProjectsLocationsServicesMoveTableToDatabaseCall) 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 +} + +type ProjectsLocationsServicesPatchCall struct { + s *Service + name string + googlecloudmetastorev2betaservice *GoogleCloudMetastoreV2betaService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single service. +// +// - name: Immutable. The relative resource name of the metastore service, in +// the following +// format:projects/{project_number}/locations/{location_id}/services/{service_ +// id}. +func (r *ProjectsLocationsServicesService) Patch(name string, googlecloudmetastorev2betaservice *GoogleCloudMetastoreV2betaService) *ProjectsLocationsServicesPatchCall { + c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2betaservice = googlecloudmetastorev2betaservice + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A field mask +// used to specify the fields to be overwritten in the metastore service +// resource by the update. Fields specified in the update_mask are relative to +// the resource (not to the full request). A field is overwritten if it is in +// the mask. +func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.patch" call. +// 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 *ProjectsLocationsServicesPatchCall) 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 +} + +type ProjectsLocationsServicesQueryMetadataCall struct { + s *Service + service string + googlecloudmetastorev2betaquerymetadatarequest *GoogleCloudMetastoreV2betaQueryMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// QueryMetadata: Query Dataproc Metastore metadata. +// +// - service: The relative resource name of the metastore service to query +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) QueryMetadata(service string, googlecloudmetastorev2betaquerymetadatarequest *GoogleCloudMetastoreV2betaQueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall { + c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betaquerymetadatarequest = googlecloudmetastorev2betaquerymetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaquerymetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:queryMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.queryMetadata" call. +// 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 *ProjectsLocationsServicesQueryMetadataCall) 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 +} + +type ProjectsLocationsServicesRemoveIamPolicyCall struct { + s *Service + resource string + googlecloudmetastorev2betaremoveiampolicyrequest *GoogleCloudMetastoreV2betaRemoveIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveIamPolicy: Removes the attached IAM policies for a resource +// +// - resource: The relative resource name of the dataplane resource to remove +// IAM policy, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}/da +// tabases/{database_id} or +// projects/{project_id}/locations/{location_id}/services/{service_id}/databas +// es/{database_id}/tables/{table_id}. +func (r *ProjectsLocationsServicesService) RemoveIamPolicy(resource string, googlecloudmetastorev2betaremoveiampolicyrequest *GoogleCloudMetastoreV2betaRemoveIamPolicyRequest) *ProjectsLocationsServicesRemoveIamPolicyCall { + c := &ProjectsLocationsServicesRemoveIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googlecloudmetastorev2betaremoveiampolicyrequest = googlecloudmetastorev2betaremoveiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRemoveIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesRemoveIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaremoveiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+resource}:removeIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.removeIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaRemoveIamPolicyResponse.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 *ProjectsLocationsServicesRemoveIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaRemoveIamPolicyResponse, 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 := &GoogleCloudMetastoreV2betaRemoveIamPolicyResponse{ + 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 +} + +type ProjectsLocationsServicesRestoreCall struct { + s *Service + service string + googlecloudmetastorev2betarestoreservicerequest *GoogleCloudMetastoreV2betaRestoreServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a service from a backup. +// +// - service: The relative resource name of the metastore service to run +// restore, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) Restore(service string, googlecloudmetastorev2betarestoreservicerequest *GoogleCloudMetastoreV2betaRestoreServiceRequest) *ProjectsLocationsServicesRestoreCall { + c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betarestoreservicerequest = googlecloudmetastorev2betarestoreservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betarestoreservicerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:restore") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.restore" call. +// 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 *ProjectsLocationsServicesRestoreCall) 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 +} + +type ProjectsLocationsServicesStartMigrationCall struct { + s *Service + service string + googlecloudmetastorev2betastartmigrationrequest *GoogleCloudMetastoreV2betaStartMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StartMigration: Starts the Managed Migration process. +// +// - service: The relative resource name of the metastore service to start +// migrating to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) StartMigration(service string, googlecloudmetastorev2betastartmigrationrequest *GoogleCloudMetastoreV2betaStartMigrationRequest) *ProjectsLocationsServicesStartMigrationCall { + c := &ProjectsLocationsServicesStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betastartmigrationrequest = googlecloudmetastorev2betastartmigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesStartMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesStartMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesStartMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesStartMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betastartmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:startMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.startMigration" call. +// 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 *ProjectsLocationsServicesStartMigrationCall) 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 +} + +type ProjectsLocationsServicesBackupsCreateCall struct { + s *Service + parent string + googlecloudmetastorev2betabackup *GoogleCloudMetastoreV2betaBackup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new backup in a given project and location. +// +// - parent: The relative resource name of the service in which to create a +// backup of the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesBackupsService) Create(parent string, googlecloudmetastorev2betabackup *GoogleCloudMetastoreV2betaBackup) *ProjectsLocationsServicesBackupsCreateCall { + c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2betabackup = googlecloudmetastorev2betabackup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID of the +// backup, which is used as the final component of the backup's name.This value +// must be between 1 and 64 characters long, begin with a letter, end with a +// letter or number, and consist of alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betabackup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.create" call. +// 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 *ProjectsLocationsServicesBackupsCreateCall) 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 +} + +type ProjectsLocationsServicesBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single backup. +// +// - name: The relative resource name of the backup to delete, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall { + c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.backups.delete" call. +// 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 *ProjectsLocationsServicesBackupsDeleteCall) 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 +} + +type ProjectsLocationsServicesBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single backup. +// +// - name: The relative resource name of the backup to retrieve, in the +// following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall { + c := &ProjectsLocationsServicesBackupsGetCall{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 +// details. +func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+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 "metastore.projects.locations.services.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaBackup.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 *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaBackup, 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 := &GoogleCloudMetastoreV2betaBackup{ + 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 +} + +type ProjectsLocationsServicesBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists backups in a service. +// +// - parent: The relative resource name of the service whose backups to list, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups. +func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall { + c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// backups to return. The response may contain less than the maximum number. If +// unspecified, no more than 500 backups are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListBackups call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListBackups must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall { + 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 +// details. +func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaListBackupsResponse.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 *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaListBackupsResponse, 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 := &GoogleCloudMetastoreV2betaListBackupsResponse{ + 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 +} + +// 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 *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2betaListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsServicesMigrationExecutionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single migration execution. +// +// - name: The relative resource name of the migrationExecution to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Delete(name string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c := &ProjectsLocationsServicesMigrationExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.migrationExecutions.delete" call. +// 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) 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 +} + +type ProjectsLocationsServicesMigrationExecutionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single migration execution. +// +// - name: The relative resource name of the migration execution to retrieve, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Get(name string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c := &ProjectsLocationsServicesMigrationExecutionsGetCall{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 +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+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 "metastore.projects.locations.services.migrationExecutions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaMigrationExecution.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 *ProjectsLocationsServicesMigrationExecutionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaMigrationExecution, 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 := &GoogleCloudMetastoreV2betaMigrationExecution{ + 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 +} + +type ProjectsLocationsServicesMigrationExecutionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists migration executions on a service. +// +// - parent: The relative resource name of the service whose migration +// executions to list, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions. +func (r *ProjectsLocationsServicesMigrationExecutionsService) List(parent string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c := &ProjectsLocationsServicesMigrationExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Filter(filter string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// migration executions to return. The response may contain less than the +// maximum number. If unspecified, no more than 500 migration executions are +// returned. The maximum value is 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListMigrationExecutions call. Provide this +// token to retrieve the subsequent page.To retrieve the first page, supply an +// empty page token.When paginating, other parameters provided to +// DataprocMetastore.ListMigrationExecutions must match the call that provided +// the page token. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMigrationExecutionsListCall { + 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 +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+parent}/migrationExecutions") + 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 "metastore.projects.locations.services.migrationExecutions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaListMigrationExecutionsResponse.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 *ProjectsLocationsServicesMigrationExecutionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaListMigrationExecutionsResponse, 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 := &GoogleCloudMetastoreV2betaListMigrationExecutionsResponse{ + 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 +} + +// 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 *ProjectsLocationsServicesMigrationExecutionsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2betaListMigrationExecutionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 40fe1467d83..76a51aa343f 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -464,7 +464,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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": "v1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networkmanagement.projects.locations.global.operations.cancel", @@ -591,7 +591,7 @@ } } }, - "revision": "20241106", + "revision": "20241202", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1003,6 +1003,15 @@ }, "type": "array" }, + "returnReachabilityDetails": { + "$ref": "ReachabilityDetails", + "description": "Output only. The reachability details of this test from the latest run for the return path. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", + "readOnly": true + }, + "roundTrip": { + "description": "Whether run analysis for the return path from destination to source. Default value is false.", + "type": "boolean" + }, "source": { "$ref": "Endpoint", "description": "Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test." diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 147e026ab97..b95b0f0d918 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -737,6 +737,14 @@ type ConnectivityTest struct { // analysis. This is applicable to scenarios where a test can cross project // boundaries. RelatedProjects []string `json:"relatedProjects,omitempty"` + // ReturnReachabilityDetails: Output only. The reachability details of this + // test from the latest run for the return path. The details are updated when + // creating a new test, updating an existing test, or triggering a one-time + // rerun of an existing test. + ReturnReachabilityDetails *ReachabilityDetails `json:"returnReachabilityDetails,omitempty"` + // RoundTrip: Whether run analysis for the return path from destination to + // source. Default value is false. + RoundTrip bool `json:"roundTrip,omitempty"` // Source: Required. Source specification of the Connectivity Test. You can use // a combination of source IP address, virtual machine (VM) instance, or // Compute Engine network to uniquely identify the source location. Examples: @@ -4375,7 +4383,7 @@ type ProjectsLocationsGlobalOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index dd40509efa7..6532ac953c6 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -464,7 +464,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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/global/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networkmanagement.projects.locations.global.operations.cancel", @@ -758,7 +758,7 @@ } } }, - "revision": "20241106", + "revision": "20241202", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1170,6 +1170,15 @@ }, "type": "array" }, + "returnReachabilityDetails": { + "$ref": "ReachabilityDetails", + "description": "Output only. The reachability details of this test from the latest run for the return path. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", + "readOnly": true + }, + "roundTrip": { + "description": "Whether run analysis for the return path from destination to source. Default value is false.", + "type": "boolean" + }, "source": { "$ref": "Endpoint", "description": "Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test." diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 3cbbb5dd700..df2ce81a471 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -749,6 +749,14 @@ type ConnectivityTest struct { // analysis. This is applicable to scenarios where a test can cross project // boundaries. RelatedProjects []string `json:"relatedProjects,omitempty"` + // ReturnReachabilityDetails: Output only. The reachability details of this + // test from the latest run for the return path. The details are updated when + // creating a new test, updating an existing test, or triggering a one-time + // rerun of an existing test. + ReturnReachabilityDetails *ReachabilityDetails `json:"returnReachabilityDetails,omitempty"` + // RoundTrip: Whether run analysis for the return path from destination to + // source. Default value is false. + RoundTrip bool `json:"roundTrip,omitempty"` // Source: Required. Source specification of the Connectivity Test. You can use // a combination of source IP address, virtual machine (VM) instance, or // Compute Engine network to uniquely identify the source location. Examples: @@ -4531,7 +4539,7 @@ type ProjectsLocationsGlobalOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/networksecurity/v1/networksecurity-api.json b/networksecurity/v1/networksecurity-api.json index c0cb1881171..4c2e4218081 100644 --- a/networksecurity/v1/networksecurity-api.json +++ b/networksecurity/v1/networksecurity-api.json @@ -586,7 +586,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networksecurity.organizations.locations.operations.cancel", @@ -2743,7 +2743,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networksecurity.projects.locations.operations.cancel", @@ -3431,7 +3431,7 @@ } } }, - "revision": "20241109", + "revision": "20241202", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AddAddressGroupItemsRequest": { @@ -3660,11 +3660,11 @@ "properties": { "from": { "$ref": "AuthzPolicyAuthzRuleFrom", - "description": "Optional. Describes properties of one or more sources of a request." + "description": "Optional. Describes properties of a source of a request." }, "to": { "$ref": "AuthzPolicyAuthzRuleTo", - "description": "Optional. Describes properties of one or more targets of a request." + "description": "Optional. Describes properties of a target of a request." }, "when": { "description": "Optional. CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes.", @@ -3685,7 +3685,7 @@ "type": "array" }, "sources": { - "description": "Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 5 sources. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match.", + "description": "Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 1 source. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match.", "items": { "$ref": "AuthzPolicyAuthzRuleFromRequestSource" }, @@ -3799,7 +3799,7 @@ "type": "array" }, "operations": { - "description": "Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 5 operations. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches.", + "description": "Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 1 operation. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches.", "items": { "$ref": "AuthzPolicyAuthzRuleToRequestOperation" }, @@ -4000,6 +4000,17 @@ }, "type": "object" }, + "CustomInterceptProfile": { + "description": "CustomInterceptProfile defines the Packet Intercept Endpoint Group used to intercept traffic to a third-party firewall in a Firewall rule.", + "id": "CustomInterceptProfile", + "properties": { + "interceptEndpointGroup": { + "description": "Required. The InterceptEndpointGroup to which traffic associated with the SP should be mirrored.", + "type": "string" + } + }, + "type": "object" + }, "CustomMirroringProfile": { "description": "CustomMirroringProfile defines an action for mirroring traffic to a collector's EndpointGroup", "id": "CustomMirroringProfile", @@ -5062,7 +5073,7 @@ "type": "object" }, "SecurityProfile": { - "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes. Next ID: 12", + "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes.", "id": "SecurityProfile", "properties": { "createTime": { @@ -5071,6 +5082,10 @@ "readOnly": true, "type": "string" }, + "customInterceptProfile": { + "$ref": "CustomInterceptProfile", + "description": "The custom TPPI configuration for the SecurityProfile." + }, "customMirroringProfile": { "$ref": "CustomMirroringProfile", "description": "The custom Packet Mirroring v2 configuration for the SecurityProfile." @@ -5104,12 +5119,14 @@ "enum": [ "PROFILE_TYPE_UNSPECIFIED", "THREAT_PREVENTION", - "CUSTOM_MIRRORING" + "CUSTOM_MIRRORING", + "CUSTOM_INTERCEPT" ], "enumDescriptions": [ "Profile type not specified.", "Profile type for threat prevention.", - "Profile type for packet mirroring v2" + "Profile type for packet mirroring v2", + "Profile type for TPPI." ], "type": "string" }, @@ -5123,7 +5140,7 @@ "type": "object" }, "SecurityProfileGroup": { - "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes. Next ID: 11", + "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes.", "id": "SecurityProfileGroup", "properties": { "createTime": { @@ -5132,6 +5149,10 @@ "readOnly": true, "type": "string" }, + "customInterceptProfile": { + "description": "Optional. Reference to a SecurityProfile with the CustomIntercept configuration.", + "type": "string" + }, "customMirroringProfile": { "description": "Optional. Reference to a SecurityProfile with the CustomMirroring configuration.", "type": "string" diff --git a/networksecurity/v1/networksecurity-gen.go b/networksecurity/v1/networksecurity-gen.go index 14f8ac4bb04..615ab678022 100644 --- a/networksecurity/v1/networksecurity-gen.go +++ b/networksecurity/v1/networksecurity-gen.go @@ -609,9 +609,9 @@ func (s AuthzPolicy) MarshalJSON() ([]byte, error) { // AuthzPolicyAuthzRule: Conditions to match against the incoming request. type AuthzPolicyAuthzRule struct { - // From: Optional. Describes properties of one or more sources of a request. + // From: Optional. Describes properties of a source of a request. From *AuthzPolicyAuthzRuleFrom `json:"from,omitempty"` - // To: Optional. Describes properties of one or more targets of a request. + // To: Optional. Describes properties of a target of a request. To *AuthzPolicyAuthzRuleTo `json:"to,omitempty"` // When: Optional. CEL expression that describes the conditions to be satisfied // for the action. The result of the CEL expression is ANDed with the from and @@ -643,8 +643,8 @@ type AuthzPolicyAuthzRuleFrom struct { // this field. At least one of sources or notSources must be specified. NotSources []*AuthzPolicyAuthzRuleFromRequestSource `json:"notSources,omitempty"` // Sources: Optional. Describes the properties of a request's sources. At least - // one of sources or notSources must be specified. Limited to 5 sources. A - // match occurs when ANY source (in sources or notSources) matches the request. + // one of sources or notSources must be specified. Limited to 1 source. A match + // occurs when ANY source (in sources or notSources) matches the request. // Within a single source, the match follows AND semantics across fields and OR // semantics within a single field, i.e. a match occurs when ANY principal // matches AND ANY ipBlocks match. @@ -829,7 +829,7 @@ type AuthzPolicyAuthzRuleTo struct { NotOperations []*AuthzPolicyAuthzRuleToRequestOperation `json:"notOperations,omitempty"` // Operations: Optional. Describes properties of one or more targets of a // request. At least one of operations or notOperations must be specified. - // Limited to 5 operations. A match occurs when ANY operation (in operations or + // Limited to 1 operation. A match occurs when ANY operation (in operations or // notOperations) matches. Within an operation, the match follows AND semantics // across fields and OR semantics within a field, i.e. a match occurs when ANY // path matches AND ANY header matches and ANY method matches. @@ -1137,6 +1137,31 @@ func (s CloneAddressGroupItemsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CustomInterceptProfile: CustomInterceptProfile defines the Packet Intercept +// Endpoint Group used to intercept traffic to a third-party firewall in a +// Firewall rule. +type CustomInterceptProfile struct { + // InterceptEndpointGroup: Required. The InterceptEndpointGroup to which + // traffic associated with the SP should be mirrored. + InterceptEndpointGroup string `json:"interceptEndpointGroup,omitempty"` + // ForceSendFields is a list of field names (e.g. "InterceptEndpointGroup") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InterceptEndpointGroup") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CustomInterceptProfile) MarshalJSON() ([]byte, error) { + type NoMethod CustomInterceptProfile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CustomMirroringProfile: CustomMirroringProfile defines an action for // mirroring traffic to a collector's EndpointGroup type CustomMirroringProfile struct { @@ -2694,10 +2719,13 @@ func (s Rule) MarshalJSON() ([]byte, error) { } // SecurityProfile: SecurityProfile is a resource that defines the behavior for -// one of many ProfileTypes. Next ID: 12 +// one of many ProfileTypes. type SecurityProfile struct { // CreateTime: Output only. Resource creation timestamp. CreateTime string `json:"createTime,omitempty"` + // CustomInterceptProfile: The custom TPPI configuration for the + // SecurityProfile. + CustomInterceptProfile *CustomInterceptProfile `json:"customInterceptProfile,omitempty"` // CustomMirroringProfile: The custom Packet Mirroring v2 configuration for the // SecurityProfile. CustomMirroringProfile *CustomMirroringProfile `json:"customMirroringProfile,omitempty"` @@ -2725,6 +2753,7 @@ type SecurityProfile struct { // "PROFILE_TYPE_UNSPECIFIED" - Profile type not specified. // "THREAT_PREVENTION" - Profile type for threat prevention. // "CUSTOM_MIRRORING" - Profile type for packet mirroring v2 + // "CUSTOM_INTERCEPT" - Profile type for TPPI. Type string `json:"type,omitempty"` // UpdateTime: Output only. Last resource update timestamp. UpdateTime string `json:"updateTime,omitempty"` @@ -2750,10 +2779,13 @@ func (s SecurityProfile) MarshalJSON() ([]byte, error) { } // SecurityProfileGroup: SecurityProfileGroup is a resource that defines the -// behavior for various ProfileTypes. Next ID: 11 +// behavior for various ProfileTypes. type SecurityProfileGroup struct { // CreateTime: Output only. Resource creation timestamp. CreateTime string `json:"createTime,omitempty"` + // CustomInterceptProfile: Optional. Reference to a SecurityProfile with the + // CustomIntercept configuration. + CustomInterceptProfile string `json:"customInterceptProfile,omitempty"` // CustomMirroringProfile: Optional. Reference to a SecurityProfile with the // CustomMirroring configuration. CustomMirroringProfile string `json:"customMirroringProfile,omitempty"` @@ -4949,7 +4981,7 @@ type OrganizationsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -12873,7 +12905,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index 99ddf2d5183..a73c3d03eb5 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -586,7 +586,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networksecurity.organizations.locations.operations.cancel", @@ -2740,19 +2740,19 @@ } } }, - "mirroringDeploymentGroups": { + "interceptDeploymentGroups": { "methods": { "create": { - "description": "Creates a new MirroringDeploymentGroup in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups", + "description": "Creates a new InterceptDeploymentGroup in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups", "httpMethod": "POST", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.create", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.create", "parameterOrder": [ "parent" ], "parameters": { - "mirroringDeploymentGroupId": { - "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_deployment_group_id from the method_signature of Create RPC", + "interceptDeploymentGroupId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and intercept_deployment_group_id from the method_signature of Create RPC", "location": "query", "type": "string" }, @@ -2769,9 +2769,9 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringDeploymentGroups", + "path": "v1beta1/{+parent}/interceptDeploymentGroups", "request": { - "$ref": "MirroringDeploymentGroup" + "$ref": "InterceptDeploymentGroup" }, "response": { "$ref": "Operation" @@ -2781,10 +2781,10 @@ ] }, "delete": { - "description": "Deletes a single MirroringDeploymentGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", + "description": "Deletes a single InterceptDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups/{interceptDeploymentGroupsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.delete", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.delete", "parameterOrder": [ "name" ], @@ -2792,7 +2792,7 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeploymentGroups/[^/]+$", "required": true, "type": "string" }, @@ -2811,10 +2811,10 @@ ] }, "get": { - "description": "Gets details of a single MirroringDeploymentGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", + "description": "Gets details of a single InterceptDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups/{interceptDeploymentGroupsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.get", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.get", "parameterOrder": [ "name" ], @@ -2822,24 +2822,24 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeploymentGroups/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "MirroringDeploymentGroup" + "$ref": "InterceptDeploymentGroup" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists MirroringDeploymentGroups in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups", + "description": "Lists InterceptDeploymentGroups in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.list", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.list", "parameterOrder": [ "parent" ], @@ -2866,34 +2866,34 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListMirroringDeploymentGroupsRequest", + "description": "Required. Parent value for ListInterceptDeploymentGroupsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringDeploymentGroups", + "path": "v1beta1/{+parent}/interceptDeploymentGroups", "response": { - "$ref": "ListMirroringDeploymentGroupsResponse" + "$ref": "ListInterceptDeploymentGroupsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates a single MirroringDeploymentGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", + "description": "Updates a single InterceptDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups/{interceptDeploymentGroupsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.patch", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Identifier. Then name of the MirroringDeploymentGroup.", + "description": "Immutable. Identifier. Then name of the InterceptDeploymentGroup.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeploymentGroups/[^/]+$", "required": true, "type": "string" }, @@ -2903,7 +2903,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringDeploymentGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the InterceptDeploymentGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2911,7 +2911,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "MirroringDeploymentGroup" + "$ref": "InterceptDeploymentGroup" }, "response": { "$ref": "Operation" @@ -2922,19 +2922,19 @@ } } }, - "mirroringDeployments": { + "interceptDeployments": { "methods": { "create": { - "description": "Creates a new MirroringDeployment in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments", + "description": "Creates a new InterceptDeployment in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments", "httpMethod": "POST", - "id": "networksecurity.projects.locations.mirroringDeployments.create", + "id": "networksecurity.projects.locations.interceptDeployments.create", "parameterOrder": [ "parent" ], "parameters": { - "mirroringDeploymentId": { - "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_deployment_id from the method_signature of Create RPC", + "interceptDeploymentId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and intercept_deployment_id from the method_signature of Create RPC", "location": "query", "type": "string" }, @@ -2951,9 +2951,9 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringDeployments", + "path": "v1beta1/{+parent}/interceptDeployments", "request": { - "$ref": "MirroringDeployment" + "$ref": "InterceptDeployment" }, "response": { "$ref": "Operation" @@ -2963,10 +2963,10 @@ ] }, "delete": { - "description": "Deletes a single MirroringDeployment.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", + "description": "Deletes a single InterceptDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments/{interceptDeploymentsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.mirroringDeployments.delete", + "id": "networksecurity.projects.locations.interceptDeployments.delete", "parameterOrder": [ "name" ], @@ -2974,7 +2974,7 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeployments/[^/]+$", "required": true, "type": "string" }, @@ -2993,10 +2993,10 @@ ] }, "get": { - "description": "Gets details of a single MirroringDeployment.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", + "description": "Gets details of a single InterceptDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments/{interceptDeploymentsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringDeployments.get", + "id": "networksecurity.projects.locations.interceptDeployments.get", "parameterOrder": [ "name" ], @@ -3004,24 +3004,24 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeployments/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "MirroringDeployment" + "$ref": "InterceptDeployment" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists MirroringDeployments in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments", + "description": "Lists InterceptDeployments in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringDeployments.list", + "id": "networksecurity.projects.locations.interceptDeployments.list", "parameterOrder": [ "parent" ], @@ -3048,34 +3048,34 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListMirroringDeploymentsRequest", + "description": "Required. Parent value for ListInterceptDeploymentsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringDeployments", + "path": "v1beta1/{+parent}/interceptDeployments", "response": { - "$ref": "ListMirroringDeploymentsResponse" + "$ref": "ListInterceptDeploymentsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates a single MirroringDeployment.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", + "description": "Updates a single InterceptDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments/{interceptDeploymentsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.mirroringDeployments.patch", + "id": "networksecurity.projects.locations.interceptDeployments.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Identifier. The name of the MirroringDeployment.", + "description": "Immutable. Identifier. The name of the InterceptDeployment.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeployments/[^/]+$", "required": true, "type": "string" }, @@ -3085,7 +3085,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringDeployment resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the InterceptDeployment resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -3093,7 +3093,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "MirroringDeployment" + "$ref": "InterceptDeployment" }, "response": { "$ref": "Operation" @@ -3104,19 +3104,19 @@ } } }, - "mirroringEndpointGroupAssociations": { + "interceptEndpointGroupAssociations": { "methods": { "create": { - "description": "Creates a new MirroringEndpointGroupAssociation in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations", + "description": "Creates a new InterceptEndpointGroupAssociation in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations", "httpMethod": "POST", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.create", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.create", "parameterOrder": [ "parent" ], "parameters": { - "mirroringEndpointGroupAssociationId": { - "description": "Optional. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_endpoint_group_association_id from the method_signature of Create RPC", + "interceptEndpointGroupAssociationId": { + "description": "Optional. Id of the requesting object If auto-generating Id server-side, remove this field and intercept_endpoint_group_association_id from the method_signature of Create RPC", "location": "query", "type": "string" }, @@ -3133,9 +3133,9 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringEndpointGroupAssociations", + "path": "v1beta1/{+parent}/interceptEndpointGroupAssociations", "request": { - "$ref": "MirroringEndpointGroupAssociation" + "$ref": "InterceptEndpointGroupAssociation" }, "response": { "$ref": "Operation" @@ -3145,10 +3145,10 @@ ] }, "delete": { - "description": "Deletes a single MirroringEndpointGroupAssociation.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", + "description": "Deletes a single InterceptEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations/{interceptEndpointGroupAssociationsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.delete", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.delete", "parameterOrder": [ "name" ], @@ -3156,7 +3156,7 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" }, @@ -3175,10 +3175,10 @@ ] }, "get": { - "description": "Gets details of a single MirroringEndpointGroupAssociation.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", + "description": "Gets details of a single InterceptEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations/{interceptEndpointGroupAssociationsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.get", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.get", "parameterOrder": [ "name" ], @@ -3186,24 +3186,24 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "MirroringEndpointGroupAssociation" + "$ref": "InterceptEndpointGroupAssociation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists MirroringEndpointGroupAssociations in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations", + "description": "Lists InterceptEndpointGroupAssociations in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.list", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.list", "parameterOrder": [ "parent" ], @@ -3230,34 +3230,34 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListMirroringEndpointGroupAssociationsRequest", + "description": "Required. Parent value for ListInterceptEndpointGroupAssociationsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringEndpointGroupAssociations", + "path": "v1beta1/{+parent}/interceptEndpointGroupAssociations", "response": { - "$ref": "ListMirroringEndpointGroupAssociationsResponse" + "$ref": "ListInterceptEndpointGroupAssociationsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates a single MirroringEndpointGroupAssociation.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", + "description": "Updates a single InterceptEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations/{interceptEndpointGroupAssociationsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.patch", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Identifier. The name of the MirroringEndpointGroupAssociation.", + "description": "Immutable. Identifier. The name of the InterceptEndpointGroupAssociation.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" }, @@ -3267,7 +3267,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringEndpointGroupAssociation resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the InterceptEndpointGroupAssociation resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -3275,7 +3275,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "MirroringEndpointGroupAssociation" + "$ref": "InterceptEndpointGroupAssociation" }, "response": { "$ref": "Operation" @@ -3286,19 +3286,19 @@ } } }, - "mirroringEndpointGroups": { + "interceptEndpointGroups": { "methods": { "create": { - "description": "Creates a new MirroringEndpointGroup in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups", + "description": "Creates a new InterceptEndpointGroup in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups", "httpMethod": "POST", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.create", + "id": "networksecurity.projects.locations.interceptEndpointGroups.create", "parameterOrder": [ "parent" ], "parameters": { - "mirroringEndpointGroupId": { - "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_endpoint_group_id from the method_signature of Create RPC", + "interceptEndpointGroupId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and intercept_endpoint_group_id from the method_signature of Create RPC", "location": "query", "type": "string" }, @@ -3315,9 +3315,9 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringEndpointGroups", + "path": "v1beta1/{+parent}/interceptEndpointGroups", "request": { - "$ref": "MirroringEndpointGroup" + "$ref": "InterceptEndpointGroup" }, "response": { "$ref": "Operation" @@ -3327,10 +3327,10 @@ ] }, "delete": { - "description": "Deletes a single MirroringEndpointGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", + "description": "Deletes a single InterceptEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups/{interceptEndpointGroupsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.delete", + "id": "networksecurity.projects.locations.interceptEndpointGroups.delete", "parameterOrder": [ "name" ], @@ -3338,7 +3338,7 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroups/[^/]+$", "required": true, "type": "string" }, @@ -3357,10 +3357,10 @@ ] }, "get": { - "description": "Gets details of a single MirroringEndpointGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", + "description": "Gets details of a single InterceptEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups/{interceptEndpointGroupsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.get", + "id": "networksecurity.projects.locations.interceptEndpointGroups.get", "parameterOrder": [ "name" ], @@ -3368,24 +3368,24 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroups/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "MirroringEndpointGroup" + "$ref": "InterceptEndpointGroup" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists MirroringEndpointGroups in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups", + "description": "Lists InterceptEndpointGroups in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.list", + "id": "networksecurity.projects.locations.interceptEndpointGroups.list", "parameterOrder": [ "parent" ], @@ -3412,34 +3412,34 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListMirroringEndpointGroupsRequest", + "description": "Required. Parent value for ListInterceptEndpointGroupsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringEndpointGroups", + "path": "v1beta1/{+parent}/interceptEndpointGroups", "response": { - "$ref": "ListMirroringEndpointGroupsResponse" + "$ref": "ListInterceptEndpointGroupsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates a single MirroringEndpointGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", + "description": "Updates a single InterceptEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups/{interceptEndpointGroupsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.patch", + "id": "networksecurity.projects.locations.interceptEndpointGroups.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Identifier. Next ID: 11 The name of the MirroringEndpointGroup.", + "description": "Immutable. Identifier. The name of the InterceptEndpointGroup.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroups/[^/]+$", "required": true, "type": "string" }, @@ -3449,7 +3449,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringEndpointGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the InterceptEndpointGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -3457,7 +3457,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "MirroringEndpointGroup" + "$ref": "InterceptEndpointGroup" }, "response": { "$ref": "Operation" @@ -3468,156 +3468,178 @@ } } }, - "operations": { + "mirroringDeploymentGroups": { "methods": { - "cancel": { - "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}/operations/{operationsId}:cancel", + "create": { + "description": "Creates a new MirroringDeploymentGroup in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups", "httpMethod": "POST", - "id": "networksecurity.projects.locations.operations.cancel", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.create", "parameterOrder": [ - "name" + "parent" ], "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", + "mirroringDeploymentGroupId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_deployment_group_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" } }, - "path": "v1beta1/{+name}:cancel", + "path": "v1beta1/{+parent}/mirroringDeploymentGroups", "request": { - "$ref": "CancelOperationRequest" + "$ref": "MirroringDeploymentGroup" }, "response": { - "$ref": "Empty" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "delete": { - "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}/operations/{operationsId}", + "description": "Deletes a single MirroringDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.operations.delete", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The name of the operation resource to be deleted.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "Empty" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "get": { - "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}/operations/{operationsId}", + "description": "Gets details of a single MirroringDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.operations.get", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The name of the operation resource.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "Operation" + "$ref": "MirroringDeploymentGroup" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "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}/operations", + "description": "Lists MirroringDeploymentGroups in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups", "httpMethod": "GET", - "id": "networksecurity.projects.locations.operations.list", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.list", "parameterOrder": [ - "name" + "parent" ], "parameters": { "filter": { - "description": "The standard list filter.", + "description": "Optional. Filtering results", "location": "query", "type": "string" }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "description": "Optional. A token identifying a page of results the server should return.", "location": "query", "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListMirroringDeploymentGroupsRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" } }, - "path": "v1beta1/{+name}/operations", + "path": "v1beta1/{+parent}/mirroringDeploymentGroups", "response": { - "$ref": "ListOperationsResponse" + "$ref": "ListMirroringDeploymentGroupsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - } - } - }, - "serverTlsPolicies": { - "methods": { - "create": { - "description": "Creates a new ServerTlsPolicy in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", - "httpMethod": "POST", - "id": "networksecurity.projects.locations.serverTlsPolicies.create", + }, + "patch": { + "description": "Updates a single MirroringDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.patch", "parameterOrder": [ - "parent" + "name" ], "parameters": { - "parent": { - "description": "Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`.", + "name": { + "description": "Immutable. Identifier. Then name of the MirroringDeploymentGroup.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", "required": true, "type": "string" }, - "serverTlsPolicyId": { - "description": "Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"server_mtls_policy\".", + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringDeploymentGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", "location": "query", "type": "string" } }, - "path": "v1beta1/{+parent}/serverTlsPolicies", + "path": "v1beta1/{+name}", "request": { - "$ref": "ServerTlsPolicy" + "$ref": "MirroringDeploymentGroup" }, "response": { "$ref": "Operation" @@ -3625,25 +3647,42 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "delete": { - "description": "Deletes a single ServerTlsPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", - "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.serverTlsPolicies.delete", + } + } + }, + "mirroringDeployments": { + "methods": { + "create": { + "description": "Creates a new MirroringDeployment in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.mirroringDeployments.create", "parameterOrder": [ - "name" + "parent" ], "parameters": { - "name": { - "description": "Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + "mirroringDeploymentId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_deployment_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" } }, - "path": "v1beta1/{+name}", + "path": "v1beta1/{+parent}/mirroringDeployments", + "request": { + "$ref": "MirroringDeployment" + }, "response": { "$ref": "Operation" }, @@ -3651,116 +3690,130 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "get": { - "description": "Gets details of a single ServerTlsPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", - "httpMethod": "GET", - "id": "networksecurity.projects.locations.serverTlsPolicies.get", + "delete": { + "description": "Deletes a single MirroringDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.mirroringDeployments.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "ServerTlsPolicy" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:getIamPolicy", + "get": { + "description": "Gets details of a single MirroringDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy", + "id": "networksecurity.projects.locations.mirroringDeployments.get", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+resource}:getIamPolicy", + "path": "v1beta1/{+name}", "response": { - "$ref": "GoogleIamV1Policy" + "$ref": "MirroringDeployment" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists ServerTlsPolicies in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + "description": "Lists MirroringDeployments in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments", "httpMethod": "GET", - "id": "networksecurity.projects.locations.serverTlsPolicies.list", + "id": "networksecurity.projects.locations.mirroringDeployments.list", "parameterOrder": [ "parent" ], "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, "pageSize": { - "description": "Maximum number of ServerTlsPolicies to return per call.", + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", + "description": "Optional. A token identifying a page of results the server should return.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", + "description": "Required. Parent value for ListMirroringDeploymentsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/serverTlsPolicies", + "path": "v1beta1/{+parent}/mirroringDeployments", "response": { - "$ref": "ListServerTlsPoliciesResponse" + "$ref": "ListMirroringDeploymentsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single ServerTlsPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "description": "Updates a single MirroringDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.serverTlsPolicies.patch", + "id": "networksecurity.projects.locations.mirroringDeployments.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", + "description": "Immutable. Identifier. The name of the MirroringDeployment.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", "required": true, "type": "string" }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringDeployment resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -3768,7 +3821,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "ServerTlsPolicy" + "$ref": "MirroringDeployment" }, "response": { "$ref": "Operation" @@ -3776,92 +3829,41 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", - "httpMethod": "POST", - "id": "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:setIamPolicy", - "request": { - "$ref": "GoogleIamV1SetIamPolicyRequest" - }, - "response": { - "$ref": "GoogleIamV1Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", - "httpMethod": "POST", - "id": "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1TestIamPermissionsRequest" - }, - "response": { - "$ref": "GoogleIamV1TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } }, - "tlsInspectionPolicies": { + "mirroringEndpointGroupAssociations": { "methods": { "create": { - "description": "Creates a new TlsInspectionPolicy in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "description": "Creates a new MirroringEndpointGroupAssociation in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations", "httpMethod": "POST", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.create", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.create", "parameterOrder": [ "parent" ], "parameters": { + "mirroringEndpointGroupAssociationId": { + "description": "Optional. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_endpoint_group_association_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, "parent": { - "description": "Required. The parent resource of the TlsInspectionPolicy. Must be in the format `projects/{project}/locations/{location}`.", + "description": "Required. Value for parent.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, - "tlsInspectionPolicyId": { - "description": "Required. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"tls_inspection_policy1\".", + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" } }, - "path": "v1beta1/{+parent}/tlsInspectionPolicies", + "path": "v1beta1/{+parent}/mirroringEndpointGroupAssociations", "request": { - "$ref": "TlsInspectionPolicy" + "$ref": "MirroringEndpointGroupAssociation" }, "response": { "$ref": "Operation" @@ -3871,25 +3873,25 @@ ] }, "delete": { - "description": "Deletes a single TlsInspectionPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "description": "Deletes a single MirroringEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.delete", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.delete", "parameterOrder": [ "name" ], "parameters": { - "force": { - "description": "If set to true, any rules for this TlsInspectionPolicy will also be deleted. (Otherwise, the request will only work if the TlsInspectionPolicy has no rules.)", - "location": "query", - "type": "boolean" - }, "name": { - "description": "Required. A name of the TlsInspectionPolicy to delete. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" } }, "path": "v1beta1/{+name}", @@ -3901,84 +3903,99 @@ ] }, "get": { - "description": "Gets details of a single TlsInspectionPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "description": "Gets details of a single MirroringEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.get", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. A name of the TlsInspectionPolicy to get. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "TlsInspectionPolicy" + "$ref": "MirroringEndpointGroupAssociation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists TlsInspectionPolicies in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "description": "Lists MirroringEndpointGroupAssociations in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations", "httpMethod": "GET", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.list", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.list", "parameterOrder": [ "parent" ], "parameters": { - "pageSize": { - "description": "Maximum number of TlsInspectionPolicies to return per call.", - "format": "int32", + "filter": { + "description": "Optional. Filtering results", "location": "query", - "type": "integer" + "type": "string" }, - "pageToken": { - "description": "The value returned by the last 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of a prior 'ListTlsInspectionPolicies' call, and that the system should return the next page of data.", + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The project and location from which the TlsInspectionPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + "description": "Required. Parent value for ListMirroringEndpointGroupAssociationsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/tlsInspectionPolicies", + "path": "v1beta1/{+parent}/mirroringEndpointGroupAssociations", "response": { - "$ref": "ListTlsInspectionPoliciesResponse" + "$ref": "ListMirroringEndpointGroupAssociationsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single TlsInspectionPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "description": "Updates a single MirroringEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.patch", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "description": "Immutable. Identifier. The name of the MirroringEndpointGroupAssociation.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringEndpointGroupAssociation resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -3986,7 +4003,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "TlsInspectionPolicy" + "$ref": "MirroringEndpointGroupAssociation" }, "response": { "$ref": "Operation" @@ -3997,33 +4014,38 @@ } } }, - "urlLists": { + "mirroringEndpointGroups": { "methods": { "create": { - "description": "Creates a new UrlList in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", + "description": "Creates a new MirroringEndpointGroup in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups", "httpMethod": "POST", - "id": "networksecurity.projects.locations.urlLists.create", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.create", "parameterOrder": [ "parent" ], "parameters": { + "mirroringEndpointGroupId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_endpoint_group_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, "parent": { - "description": "Required. The parent resource of the UrlList. Must be in the format `projects/*/locations/{location}`.", + "description": "Required. Value for parent.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, - "urlListId": { - "description": "Required. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"url_list\".", + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" } }, - "path": "v1beta1/{+parent}/urlLists", + "path": "v1beta1/{+parent}/mirroringEndpointGroups", "request": { - "$ref": "UrlList" + "$ref": "MirroringEndpointGroup" }, "response": { "$ref": "Operation" @@ -4033,20 +4055,25 @@ ] }, "delete": { - "description": "Deletes a single UrlList.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "description": "Deletes a single MirroringEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.urlLists.delete", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. A name of the UrlList to delete. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" } }, "path": "v1beta1/{+name}", @@ -4058,84 +4085,99 @@ ] }, "get": { - "description": "Gets details of a single UrlList.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "description": "Gets details of a single MirroringEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.urlLists.get", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. A name of the UrlList to get. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "UrlList" + "$ref": "MirroringEndpointGroup" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists UrlLists in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", + "description": "Lists MirroringEndpointGroups in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups", "httpMethod": "GET", - "id": "networksecurity.projects.locations.urlLists.list", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.list", "parameterOrder": [ "parent" ], "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, "pageSize": { - "description": "Maximum number of UrlLists to return per call.", + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The value returned by the last `ListUrlListsResponse` Indicates that this is a continuation of a prior `ListUrlLists` call, and that the system should return the next page of data.", + "description": "Optional. A token identifying a page of results the server should return.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The project and location from which the UrlLists should be listed, specified in the format `projects/{project}/locations/{location}`.", + "description": "Required. Parent value for ListMirroringEndpointGroupsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/urlLists", + "path": "v1beta1/{+parent}/mirroringEndpointGroups", "response": { - "$ref": "ListUrlListsResponse" + "$ref": "ListMirroringEndpointGroupsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single UrlList.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "description": "Updates a single MirroringEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.urlLists.patch", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "description": "Immutable. Identifier. Next ID: 11 The name of the MirroringEndpointGroup.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", "required": true, "type": "string" }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the UrlList resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringEndpointGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -4143,7 +4185,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "UrlList" + "$ref": "MirroringEndpointGroup" }, "response": { "$ref": "Operation" @@ -4153,132 +4195,1210 @@ ] } } - } - } - } - } - } - }, - "revision": "20241109", - "rootUrl": "https://networksecurity.googleapis.com/", - "schemas": { - "AddAddressGroupItemsRequest": { - "description": "Request used by the AddAddressGroupItems method.", - "id": "AddAddressGroupItemsRequest", - "properties": { - "items": { - "description": "Required. List of items to add.", - "items": { - "type": "string" - }, - "type": "array" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "type": "string" - } - }, - "type": "object" - }, - "AddressGroup": { - "description": "AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy.", - "id": "AddressGroup", - "properties": { - "capacity": { - "description": "Required. Capacity of the Address Group", - "format": "int32", - "type": "integer" - }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. Free-text description of the resource.", - "type": "string" - }, - "items": { - "description": "Optional. List of items.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the AddressGroup resource.", - "type": "object" - }, - "name": { - "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", - "type": "string" - }, - "purpose": { - "description": "Optional. List of supported purposes of the Address Group.", - "items": { - "enum": [ - "PURPOSE_UNSPECIFIED", - "DEFAULT", - "CLOUD_ARMOR" - ], - "enumDescriptions": [ - "Default value. Should never happen.", - "Address Group is distributed to VMC, and is usable in Firewall Policies and other systems that rely on VMC.", - "Address Group is usable in Cloud Armor." - ], - "type": "string" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined fully-qualified URL for this resource.", - "readOnly": true, - "type": "string" - }, - "type": { - "description": "Required. The type of the Address Group. Possible values are \"IPv4\" or \"IPV6\".", - "enum": [ - "TYPE_UNSPECIFIED", - "IPV4", - "IPV6" - ], - "enumDescriptions": [ - "Default value.", - "IP v4 ranges.", - "IP v6 ranges." - ], - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "AuthorizationPolicy": { - "description": "AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.", - "id": "AuthorizationPolicy", - "properties": { - "action": { - "description": "Required. The action to take when a rule match is found. Possible values are \"ALLOW\" or \"DENY\".", - "enum": [ - "ACTION_UNSPECIFIED", - "ALLOW", - "DENY" - ], - "enumDescriptions": [ - "Default value.", - "Grant access.", - "Deny access. Deny rules should be avoided unless they are used to provide a default \"deny all\" fallback." - ], - "type": "string" + }, + "operations": { + "methods": { + "cancel": { + "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}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "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}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "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}/operations/{operationsId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "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}/operations", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.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/[^/]+$", + "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": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serverTlsPolicies": { + "methods": { + "create": { + "description": "Creates a new ServerTlsPolicy in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.serverTlsPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "serverTlsPolicyId": { + "description": "Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"server_mtls_policy\".", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/serverTlsPolicies", + "request": { + "$ref": "ServerTlsPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ServerTlsPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.serverTlsPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ServerTlsPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.serverTlsPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "ServerTlsPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ServerTlsPolicies in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.serverTlsPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of ServerTlsPolicies to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/serverTlsPolicies", + "response": { + "$ref": "ListServerTlsPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single ServerTlsPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.serverTlsPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "ServerTlsPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "tlsInspectionPolicies": { + "methods": { + "create": { + "description": "Creates a new TlsInspectionPolicy in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the TlsInspectionPolicy. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "tlsInspectionPolicyId": { + "description": "Required. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"tls_inspection_policy1\".", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tlsInspectionPolicies", + "request": { + "$ref": "TlsInspectionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single TlsInspectionPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "If set to true, any rules for this TlsInspectionPolicy will also be deleted. (Otherwise, the request will only work if the TlsInspectionPolicy has no rules.)", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. A name of the TlsInspectionPolicy to delete. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single TlsInspectionPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the TlsInspectionPolicy to get. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "TlsInspectionPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists TlsInspectionPolicies in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of TlsInspectionPolicies to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of a prior 'ListTlsInspectionPolicies' call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the TlsInspectionPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tlsInspectionPolicies", + "response": { + "$ref": "ListTlsInspectionPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single TlsInspectionPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "TlsInspectionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "urlLists": { + "methods": { + "create": { + "description": "Creates a new UrlList in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.urlLists.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the UrlList. Must be in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "urlListId": { + "description": "Required. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"url_list\".", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/urlLists", + "request": { + "$ref": "UrlList" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single UrlList.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.urlLists.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the UrlList to delete. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single UrlList.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.urlLists.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the UrlList to get. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "UrlList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists UrlLists in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.urlLists.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of UrlLists to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListUrlListsResponse` Indicates that this is a continuation of a prior `ListUrlLists` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the UrlLists should be listed, specified in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/urlLists", + "response": { + "$ref": "ListUrlListsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single UrlList.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.urlLists.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the UrlList resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "UrlList" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20241202", + "rootUrl": "https://networksecurity.googleapis.com/", + "schemas": { + "AddAddressGroupItemsRequest": { + "description": "Request used by the AddAddressGroupItems method.", + "id": "AddAddressGroupItemsRequest", + "properties": { + "items": { + "description": "Required. List of items to add.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, + "AddressGroup": { + "description": "AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy.", + "id": "AddressGroup", + "properties": { + "capacity": { + "description": "Required. Capacity of the Address Group", + "format": "int32", + "type": "integer" + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "items": { + "description": "Optional. List of items.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the AddressGroup resource.", + "type": "object" + }, + "name": { + "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", + "type": "string" + }, + "purpose": { + "description": "Optional. List of supported purposes of the Address Group.", + "items": { + "enum": [ + "PURPOSE_UNSPECIFIED", + "DEFAULT", + "CLOUD_ARMOR" + ], + "enumDescriptions": [ + "Default value. Should never happen.", + "Address Group is distributed to VMC, and is usable in Firewall Policies and other systems that rely on VMC.", + "Address Group is usable in Cloud Armor." + ], + "type": "string" + }, + "type": "array" + }, + "selfLink": { + "description": "Output only. Server-defined fully-qualified URL for this resource.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. The type of the Address Group. Possible values are \"IPv4\" or \"IPV6\".", + "enum": [ + "TYPE_UNSPECIFIED", + "IPV4", + "IPV6" + ], + "enumDescriptions": [ + "Default value.", + "IP v4 ranges.", + "IP v6 ranges." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AuthorizationPolicy": { + "description": "AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.", + "id": "AuthorizationPolicy", + "properties": { + "action": { + "description": "Required. The action to take when a rule match is found. Possible values are \"ALLOW\" or \"DENY\".", + "enum": [ + "ACTION_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "Default value.", + "Grant access.", + "Deny access. Deny rules should be avoided unless they are used to provide a default \"deny all\" fallback." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the AuthorizationPolicy resource.", + "type": "object" + }, + "name": { + "description": "Required. Name of the AuthorizationPolicy resource. It matches pattern `projects/{project}/locations/{location}/authorizationPolicies/`.", + "type": "string" + }, + "rules": { + "description": "Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the `action` field will be applied on every request.", + "items": { + "$ref": "Rule" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AuthzPolicy": { + "description": "`AuthzPolicy` is a resource that allows to forward traffic to a callout backend designed to scan the traffic for security purposes.", + "id": "AuthzPolicy", + "properties": { + "action": { + "description": "Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`. When the action is `CUSTOM`, `customProvider` must be specified. When the action is `ALLOW`, only requests matching the policy will be allowed. When the action is `DENY`, only requests matching the policy will be denied. When a request arrives, the policies are evaluated in the following order: 1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM` policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request. 2. If there are any `DENY` policies that match the request, the request is denied. 3. If there are no `ALLOW` policies for the resource or if any of the `ALLOW` policies match the request, the request is allowed. 4. Else the request is denied by default if none of the configured AuthzPolicies with `ALLOW` action match the request.", + "enum": [ + "AUTHZ_ACTION_UNSPECIFIED", + "ALLOW", + "DENY", + "CUSTOM" + ], + "enumDescriptions": [ + "Unspecified action.", + "Allow request to pass through to the backend.", + "Deny the request and return a HTTP 404 to the client.", + "Delegate the authorization decision to an external authorization engine." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "customProvider": { + "$ref": "AuthzPolicyCustomProvider", + "description": "Optional. Required if the action is `CUSTOM`. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One of `cloudIap` or `authzExtension` must be specified." + }, + "description": { + "description": "Optional. A human-readable description of the resource.", + "type": "string" + }, + "httpRules": { + "description": "Optional. A list of authorization HTTP rules to match against the incoming request. A policy match occurs when at least one HTTP rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow or Deny Action. Limited to 5 rules.", + "items": { + "$ref": "AuthzPolicyAuthzRule" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of labels associated with the `AuthzPolicy` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "type": "object" + }, + "name": { + "description": "Required. Identifier. Name of the `AuthzPolicy` resource in the following format: `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.", + "type": "string" + }, + "target": { + "$ref": "AuthzPolicyTarget", + "description": "Required. Specifies the set of resources to which this policy should be applied to." + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRule": { + "description": "Conditions to match against the incoming request.", + "id": "AuthzPolicyAuthzRule", + "properties": { + "from": { + "$ref": "AuthzPolicyAuthzRuleFrom", + "description": "Optional. Describes properties of a source of a request." + }, + "to": { + "$ref": "AuthzPolicyAuthzRuleTo", + "description": "Optional. Describes properties of a target of a request." + }, + "when": { + "description": "Optional. CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes.", + "type": "string" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleFrom": { + "description": "Describes properties of one or more sources of a request.", + "id": "AuthzPolicyAuthzRuleFrom", + "properties": { + "notSources": { + "description": "Optional. Describes the negated properties of request sources. Matches requests from sources that do not match the criteria specified in this field. At least one of sources or notSources must be specified.", + "items": { + "$ref": "AuthzPolicyAuthzRuleFromRequestSource" + }, + "type": "array" + }, + "sources": { + "description": "Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 1 source. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match.", + "items": { + "$ref": "AuthzPolicyAuthzRuleFromRequestSource" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleFromRequestSource": { + "description": "Describes the properties of a single source.", + "id": "AuthzPolicyAuthzRuleFromRequestSource", + "properties": { + "principals": { + "description": "Optional. A list of identities derived from the client's certificate. This field will not match on a request unless mutual TLS is enabled for the Forwarding rule or Gateway. Each identity is a string whose value is matched against the URI SAN, or DNS SAN or the subject field in the client's certificate. The match can be exact, prefix, suffix or a substring match. One of exact, prefix, suffix or contains must be specified. Limited to 5 principals.", + "items": { + "$ref": "AuthzPolicyAuthzRuleStringMatch" + }, + "type": "array" + }, + "resources": { + "description": "Optional. A list of resources to match against the resource of the source VM of a request. Limited to 5 resources.", + "items": { + "$ref": "AuthzPolicyAuthzRuleRequestResource" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleHeaderMatch": { + "description": "Determines how a HTTP header should be matched.", + "id": "AuthzPolicyAuthzRuleHeaderMatch", + "properties": { + "name": { + "description": "Optional. Specifies the name of the header in the request.", + "type": "string" + }, + "value": { + "$ref": "AuthzPolicyAuthzRuleStringMatch", + "description": "Optional. Specifies how the header match will be performed." + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleRequestResource": { + "description": "Describes the properties of a client VM resource accessing the internal application load balancers.", + "id": "AuthzPolicyAuthzRuleRequestResource", + "properties": { + "iamServiceAccount": { + "$ref": "AuthzPolicyAuthzRuleStringMatch", + "description": "Optional. An IAM service account to match against the source service account of the VM sending the request." + }, + "tagValueIdSet": { + "$ref": "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet", + "description": "Optional. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request." + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet": { + "description": "Describes a set of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request.", + "id": "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet", + "properties": { + "ids": { + "description": "Required. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. The match follows AND semantics which means all the ids must match. Limited to 5 matches.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleStringMatch": { + "description": "Determines how a string value should be matched.", + "id": "AuthzPolicyAuthzRuleStringMatch", + "properties": { + "contains": { + "description": "The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``", + "type": "string" + }, + "exact": { + "description": "The input string must match exactly the string specified here. Examples: * ``abc`` only matches the value ``abc``.", + "type": "string" + }, + "ignoreCase": { + "description": "If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true.", + "type": "boolean" + }, + "prefix": { + "description": "The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``abc.xyz``", + "type": "string" + }, + "suffix": { + "description": "The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc``", + "type": "string" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleTo": { + "description": "Describes properties of one or more targets of a request.", + "id": "AuthzPolicyAuthzRuleTo", + "properties": { + "notOperations": { + "description": "Optional. Describes the negated properties of the targets of a request. Matches requests for operations that do not match the criteria specified in this field. At least one of operations or notOperations must be specified.", + "items": { + "$ref": "AuthzPolicyAuthzRuleToRequestOperation" + }, + "type": "array" + }, + "operations": { + "description": "Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 1 operation. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches.", + "items": { + "$ref": "AuthzPolicyAuthzRuleToRequestOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleToRequestOperation": { + "description": "Describes properties of one or more targets of a request.", + "id": "AuthzPolicyAuthzRuleToRequestOperation", + "properties": { + "headerSet": { + "$ref": "AuthzPolicyAuthzRuleToRequestOperationHeaderSet", + "description": "Optional. A list of headers to match against in http header." + }, + "hosts": { + "description": "Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches.", + "items": { + "$ref": "AuthzPolicyAuthzRuleStringMatch" + }, + "type": "array" + }, + "methods": { + "description": "Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive.", + "items": { + "type": "string" + }, + "type": "array" + }, + "paths": { + "description": "Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method.", + "items": { + "$ref": "AuthzPolicyAuthzRuleStringMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleToRequestOperationHeaderSet": { + "description": "Describes a set of HTTP headers to match against.", + "id": "AuthzPolicyAuthzRuleToRequestOperationHeaderSet", + "properties": { + "headers": { + "description": "Required. A list of headers to match against in http header. The match can be one of exact, prefix, suffix, or contains (substring match). The match follows AND semantics which means all the headers must match. Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches.", + "items": { + "$ref": "AuthzPolicyAuthzRuleHeaderMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyCustomProvider": { + "description": "Allows delegating authorization decisions to Cloud IAP or to Service Extensions.", + "id": "AuthzPolicyCustomProvider", + "properties": { + "authzExtension": { + "$ref": "AuthzPolicyCustomProviderAuthzExtension", + "description": "Optional. Delegate authorization decision to user authored Service Extension. Only one of cloudIap or authzExtension can be specified." + }, + "cloudIap": { + "$ref": "AuthzPolicyCustomProviderCloudIap", + "description": "Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places." + } + }, + "type": "object" + }, + "AuthzPolicyCustomProviderAuthzExtension": { + "description": "Optional. Delegate authorization decision to user authored extension. Only one of cloudIap or authzExtension can be specified.", + "id": "AuthzPolicyCustomProviderAuthzExtension", + "properties": { + "resources": { + "description": "Required. A list of references to authorization extensions that will be invoked for requests matching this policy. Limited to 1 custom provider.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyCustomProviderCloudIap": { + "description": "Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places.", + "id": "AuthzPolicyCustomProviderCloudIap", + "properties": {}, + "type": "object" + }, + "AuthzPolicyTarget": { + "description": "Specifies the set of targets to which this policy should be applied to.", + "id": "AuthzPolicyTarget", + "properties": { + "loadBalancingScheme": { + "description": "Required. All gateways and forwarding rules referenced by this policy and extensions must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to [Backend services overview](https://cloud.google.com/load-balancing/docs/backend-service).", + "enum": [ + "LOAD_BALANCING_SCHEME_UNSPECIFIED", + "INTERNAL_MANAGED", + "EXTERNAL_MANAGED", + "INTERNAL_SELF_MANAGED" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "Signifies that this is used for Regional internal or Cross-region internal Application Load Balancing.", + "Signifies that this is used for Global external or Regional external Application Load Balancing.", + "Signifies that this is used for Cloud Service Mesh. Meant for use by CSM GKE controller only." + ], + "type": "string" + }, + "resources": { + "description": "Required. A list of references to the Forwarding Rules on which this policy will be applied.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "CertificateProviderInstance": { + "description": "Specification of a TLS certificate provider instance. Workloads may have one or more CertificateProvider instances (plugins) and one of them is enabled and configured by specifying this message. Workloads use the values from this message to locate and load the CertificateProvider instance configuration.", + "id": "CertificateProviderInstance", + "properties": { + "pluginInstance": { + "description": "Required. Plugin instance name, used to locate and load CertificateProvider instance configuration. Set to \"google_cloud_private_spiffe\" to use Certificate Authority Service certificate provider instance.", + "type": "string" + } + }, + "type": "object" + }, + "ClientTlsPolicy": { + "description": "ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.", + "id": "ClientTlsPolicy", + "properties": { + "clientCertificate": { + "$ref": "GoogleCloudNetworksecurityV1beta1CertificateProvider", + "description": "Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS." }, "createTime": { "description": "Output only. The timestamp when the resource was created.", @@ -4294,20 +5414,24 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Set of label tags associated with the AuthorizationPolicy resource.", + "description": "Optional. Set of label tags associated with the resource.", "type": "object" }, "name": { - "description": "Required. Name of the AuthorizationPolicy resource. It matches pattern `projects/{project}/locations/{location}/authorizationPolicies/`.", + "description": "Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`", "type": "string" }, - "rules": { - "description": "Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the `action` field will be applied on every request.", + "serverValidationCa": { + "description": "Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.", "items": { - "$ref": "Rule" + "$ref": "ValidationCA" }, "type": "array" }, + "sni": { + "description": "Optional. Server Name Indication string to present to the server during TLS handshake. E.g: \"secure.example.com\".", + "type": "string" + }, "updateTime": { "description": "Output only. The timestamp when the resource was updated.", "format": "google-datetime", @@ -4317,64 +5441,249 @@ }, "type": "object" }, - "AuthzPolicy": { - "description": "`AuthzPolicy` is a resource that allows to forward traffic to a callout backend designed to scan the traffic for security purposes.", - "id": "AuthzPolicy", + "CloneAddressGroupItemsRequest": { + "description": "Request used by the CloneAddressGroupItems method.", + "id": "CloneAddressGroupItemsRequest", "properties": { - "action": { - "description": "Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`. When the action is `CUSTOM`, `customProvider` must be specified. When the action is `ALLOW`, only requests matching the policy will be allowed. When the action is `DENY`, only requests matching the policy will be denied. When a request arrives, the policies are evaluated in the following order: 1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM` policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request. 2. If there are any `DENY` policies that match the request, the request is denied. 3. If there are no `ALLOW` policies for the resource or if any of the `ALLOW` policies match the request, the request is allowed. 4. Else the request is denied by default if none of the configured AuthzPolicies with `ALLOW` action match the request.", + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "sourceAddressGroup": { + "description": "Required. Source address group to clone items from.", + "type": "string" + } + }, + "type": "object" + }, + "CustomInterceptProfile": { + "description": "CustomInterceptProfile defines the Packet Intercept Endpoint Group used to intercept traffic to a third-party firewall in a Firewall rule.", + "id": "CustomInterceptProfile", + "properties": { + "interceptEndpointGroup": { + "description": "Required. The InterceptEndpointGroup to which traffic associated with the SP should be mirrored.", + "type": "string" + } + }, + "type": "object" + }, + "CustomMirroringProfile": { + "description": "CustomMirroringProfile defines an action for mirroring traffic to a collector's EndpointGroup", + "id": "CustomMirroringProfile", + "properties": { + "mirroringEndpointGroup": { + "description": "Required. The MirroringEndpointGroup to which traffic associated with the SP should be mirrored.", + "type": "string" + } + }, + "type": "object" + }, + "Destination": { + "description": "Specification of traffic destination attributes.", + "id": "Destination", + "properties": { + "hosts": { + "description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example \"*.myorg.com\") or a presence (any) match \"*\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "httpHeaderMatch": { + "$ref": "HttpHeaderMatch", + "description": "Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy." + }, + "methods": { + "description": "Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ports": { + "description": "Required. List of destination ports to match. At least one port should match.", + "items": { + "format": "uint32", + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "FirewallEndpoint": { + "description": "Message describing Endpoint object", + "id": "FirewallEndpoint", + "properties": { + "associatedNetworks": { + "deprecated": true, + "description": "Output only. List of networks that are associated with this endpoint in the local zone. This is a projection of the FirewallEndpointAssociations pointing at this endpoint. A network will only appear in this list after traffic routing is fully configured. Format: projects/{project}/global/networks/{name}.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "associations": { + "description": "Output only. List of FirewallEndpointAssociations that are associated to this endpoint. An association will only appear in this list after traffic routing is fully configured.", + "items": { + "$ref": "FirewallEndpointAssociationReference" + }, + "readOnly": true, + "type": "array" + }, + "billingProjectId": { + "description": "Required. Project to bill on endpoint uptime usage.", + "type": "string" + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the firewall endpoint. Max length 2048 characters.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "Immutable. Identifier. name of resource", + "type": "string" + }, + "reconciling": { + "description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. Current state of the endpoint.", "enum": [ - "AUTHZ_ACTION_UNSPECIFIED", - "ALLOW", - "DENY", - "CUSTOM" + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "INACTIVE" ], "enumDescriptions": [ - "Unspecified action.", - "Allow request to pass through to the backend.", - "Deny the request and return a HTTP 404 to the client.", - "Delegate the authorization decision to an external authorization engine." + "Not set.", + "Being created.", + "Processing configuration updates.", + "Being deleted.", + "Down or in an error state." ], + "readOnly": true, "type": "string" }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "FirewallEndpointAssociation": { + "description": "Message describing Association object", + "id": "FirewallEndpointAssociation", + "properties": { "createTime": { - "description": "Output only. The timestamp when the resource was created.", + "description": "Output only. Create time stamp", "format": "google-datetime", "readOnly": true, "type": "string" }, - "customProvider": { - "$ref": "AuthzPolicyCustomProvider", - "description": "Optional. Required if the action is `CUSTOM`. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One of `cloudIap` or `authzExtension` must be specified." + "disabled": { + "description": "Optional. Whether the association is disabled. True indicates that traffic won't be intercepted", + "type": "boolean" }, - "description": { - "description": "Optional. A human-readable description of the resource.", + "firewallEndpoint": { + "description": "Required. The URL of the FirewallEndpoint that is being associated.", "type": "string" }, - "httpRules": { - "description": "Optional. A list of authorization HTTP rules to match against the incoming request. A policy match occurs when at least one HTTP rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow or Deny Action. Limited to 5 rules.", - "items": { - "$ref": "AuthzPolicyAuthzRule" - }, - "type": "array" - }, "labels": { "additionalProperties": { "type": "string" }, - "description": "Optional. Set of labels associated with the `AuthzPolicy` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "description": "Optional. Labels as key value pairs", "type": "object" }, "name": { - "description": "Required. Identifier. Name of the `AuthzPolicy` resource in the following format: `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.", + "description": "Immutable. Identifier. name of resource", + "type": "string" + }, + "network": { + "description": "Required. The URL of the network that is being associated.", + "type": "string" + }, + "reconciling": { + "description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. Current state of the association.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "INACTIVE", + "ORPHAN" + ], + "enumDescriptions": [ + "Not set.", + "Being created.", + "Active and ready for traffic.", + "Being deleted.", + "Down or in an error state.", + "The project that housed the association has been deleted." + ], + "readOnly": true, "type": "string" }, - "target": { - "$ref": "AuthzPolicyTarget", - "description": "Required. Specifies the set of resources to which this policy should be applied to." + "tlsInspectionPolicy": { + "description": "Optional. The URL of the TlsInspectionPolicy that is being associated.", + "type": "string" }, "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", + "description": "Output only. Update time stamp", "format": "google-datetime", "readOnly": true, "type": "string" @@ -4382,458 +5691,318 @@ }, "type": "object" }, - "AuthzPolicyAuthzRule": { - "description": "Conditions to match against the incoming request.", - "id": "AuthzPolicyAuthzRule", + "FirewallEndpointAssociationReference": { + "description": "This is a subset of the FirewallEndpointAssociation message, containing fields to be used by the consumer.", + "id": "FirewallEndpointAssociationReference", "properties": { - "from": { - "$ref": "AuthzPolicyAuthzRuleFrom", - "description": "Optional. Describes properties of one or more sources of a request." - }, - "to": { - "$ref": "AuthzPolicyAuthzRuleTo", - "description": "Optional. Describes properties of one or more targets of a request." + "name": { + "description": "Output only. The resource name of the FirewallEndpointAssociation. Format: projects/{project}/locations/{location}/firewallEndpointAssociations/{id}", + "readOnly": true, + "type": "string" }, - "when": { - "description": "Optional. CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes.", + "network": { + "description": "Output only. The VPC network associated. Format: projects/{project}/global/networks/{name}.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "AuthzPolicyAuthzRuleFrom": { - "description": "Describes properties of one or more sources of a request.", - "id": "AuthzPolicyAuthzRuleFrom", + "GatewaySecurityPolicy": { + "description": "The GatewaySecurityPolicy resource contains a collection of GatewaySecurityPolicyRules and associated metadata.", + "id": "GatewaySecurityPolicy", "properties": { - "notSources": { - "description": "Optional. Describes the negated properties of request sources. Matches requests from sources that do not match the criteria specified in this field. At least one of sources or notSources must be specified.", - "items": { - "$ref": "AuthzPolicyAuthzRuleFromRequestSource" - }, - "type": "array" + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "sources": { - "description": "Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 5 sources. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match.", - "items": { - "$ref": "AuthzPolicyAuthzRuleFromRequestSource" - }, - "type": "array" - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleFromRequestSource": { - "description": "Describes the properties of a single source.", - "id": "AuthzPolicyAuthzRuleFromRequestSource", - "properties": { - "principals": { - "description": "Optional. A list of identities derived from the client's certificate. This field will not match on a request unless mutual TLS is enabled for the Forwarding rule or Gateway. Each identity is a string whose value is matched against the URI SAN, or DNS SAN or the subject field in the client's certificate. The match can be exact, prefix, suffix or a substring match. One of exact, prefix, suffix or contains must be specified. Limited to 5 principals.", - "items": { - "$ref": "AuthzPolicyAuthzRuleStringMatch" - }, - "type": "array" + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" }, - "resources": { - "description": "Optional. A list of resources to match against the resource of the source VM of a request. Limited to 5 resources.", - "items": { - "$ref": "AuthzPolicyAuthzRuleRequestResource" - }, - "type": "array" - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleHeaderMatch": { - "description": "Determines how a HTTP header should be matched.", - "id": "AuthzPolicyAuthzRuleHeaderMatch", - "properties": { "name": { - "description": "Optional. Specifies the name of the header in the request.", + "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", "type": "string" }, - "value": { - "$ref": "AuthzPolicyAuthzRuleStringMatch", - "description": "Optional. Specifies how the header match will be performed." - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleRequestResource": { - "description": "Describes the properties of a client VM resource accessing the internal application load balancers.", - "id": "AuthzPolicyAuthzRuleRequestResource", - "properties": { - "iamServiceAccount": { - "$ref": "AuthzPolicyAuthzRuleStringMatch", - "description": "Optional. An IAM service account to match against the source service account of the VM sending the request." + "tlsInspectionPolicy": { + "description": "Optional. Name of a TLS Inspection Policy resource that defines how TLS inspection will be performed for any rule(s) which enables it.", + "type": "string" }, - "tagValueIdSet": { - "$ref": "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet", - "description": "Optional. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request." - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet": { - "description": "Describes a set of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request.", - "id": "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet", - "properties": { - "ids": { - "description": "Required. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. The match follows AND semantics which means all the ids must match. Limited to 5 matches.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "AuthzPolicyAuthzRuleStringMatch": { - "description": "Determines how a string value should be matched.", - "id": "AuthzPolicyAuthzRuleStringMatch", + "GatewaySecurityPolicyRule": { + "description": "The GatewaySecurityPolicyRule resource is in a nested collection within a GatewaySecurityPolicy and represents a traffic matching condition and associated action to perform.", + "id": "GatewaySecurityPolicyRule", "properties": { - "contains": { - "description": "The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``", + "applicationMatcher": { + "description": "Optional. CEL expression for matching on L7/application level criteria.", "type": "string" }, - "exact": { - "description": "The input string must match exactly the string specified here. Examples: * ``abc`` only matches the value ``abc``.", + "basicProfile": { + "description": "Required. Profile which tells what the primitive action should be.", + "enum": [ + "BASIC_PROFILE_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "If there is not a mentioned action for the target.", + "Allow the matched traffic.", + "Deny the matched traffic." + ], "type": "string" }, - "ignoreCase": { - "description": "If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true.", - "type": "boolean" + "createTime": { + "description": "Output only. Time when the rule was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "prefix": { - "description": "The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``abc.xyz``", + "description": { + "description": "Optional. Free-text description of the resource.", "type": "string" }, - "suffix": { - "description": "The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc``", + "enabled": { + "description": "Required. Whether the rule is enforced.", + "type": "boolean" + }, + "name": { + "description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", "type": "string" - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleTo": { - "description": "Describes properties of one or more targets of a request.", - "id": "AuthzPolicyAuthzRuleTo", - "properties": { - "notOperations": { - "description": "Optional. Describes the negated properties of the targets of a request. Matches requests for operations that do not match the criteria specified in this field. At least one of operations or notOperations must be specified.", - "items": { - "$ref": "AuthzPolicyAuthzRuleToRequestOperation" - }, - "type": "array" }, - "operations": { - "description": "Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 5 operations. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches.", - "items": { - "$ref": "AuthzPolicyAuthzRuleToRequestOperation" - }, - "type": "array" - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleToRequestOperation": { - "description": "Describes properties of one or more targets of a request.", - "id": "AuthzPolicyAuthzRuleToRequestOperation", - "properties": { - "headerSet": { - "$ref": "AuthzPolicyAuthzRuleToRequestOperationHeaderSet", - "description": "Optional. A list of headers to match against in http header." + "priority": { + "description": "Required. Priority of the rule. Lower number corresponds to higher precedence.", + "format": "int32", + "type": "integer" }, - "hosts": { - "description": "Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches.", - "items": { - "$ref": "AuthzPolicyAuthzRuleStringMatch" - }, - "type": "array" + "sessionMatcher": { + "description": "Required. CEL expression for matching on session criteria.", + "type": "string" }, - "methods": { - "description": "Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive.", - "items": { - "type": "string" - }, - "type": "array" + "tlsInspectionEnabled": { + "description": "Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.", + "type": "boolean" }, - "paths": { - "description": "Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method.", - "items": { - "$ref": "AuthzPolicyAuthzRuleStringMatch" - }, - "type": "array" + "updateTime": { + "description": "Output only. Time when the rule was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "AuthzPolicyAuthzRuleToRequestOperationHeaderSet": { - "description": "Describes a set of HTTP headers to match against.", - "id": "AuthzPolicyAuthzRuleToRequestOperationHeaderSet", - "properties": { - "headers": { - "description": "Required. A list of headers to match against in http header. The match can be one of exact, prefix, suffix, or contains (substring match). The match follows AND semantics which means all the headers must match. Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches.", - "items": { - "$ref": "AuthzPolicyAuthzRuleHeaderMatch" - }, - "type": "array" + "GoogleCloudNetworksecurityV1beta1CertificateProvider": { + "description": "Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.", + "id": "GoogleCloudNetworksecurityV1beta1CertificateProvider", + "properties": { + "certificateProviderInstance": { + "$ref": "CertificateProviderInstance", + "description": "The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information." + }, + "grpcEndpoint": { + "$ref": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", + "description": "gRPC specific configuration to access the gRPC server to obtain the cert and private key." } }, "type": "object" }, - "AuthzPolicyCustomProvider": { - "description": "Allows delegating authorization decisions to Cloud IAP or to Service Extensions.", - "id": "AuthzPolicyCustomProvider", + "GoogleCloudNetworksecurityV1beta1GrpcEndpoint": { + "description": "Specification of the GRPC Endpoint.", + "id": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", "properties": { - "authzExtension": { - "$ref": "AuthzPolicyCustomProviderAuthzExtension", - "description": "Optional. Delegate authorization decision to user authored Service Extension. Only one of cloudIap or authzExtension can be specified." - }, - "cloudIap": { - "$ref": "AuthzPolicyCustomProviderCloudIap", - "description": "Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places." + "targetUri": { + "description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with \"unix:\".", + "type": "string" } }, "type": "object" }, - "AuthzPolicyCustomProviderAuthzExtension": { - "description": "Optional. Delegate authorization decision to user authored extension. Only one of cloudIap or authzExtension can be specified.", - "id": "AuthzPolicyCustomProviderAuthzExtension", + "GoogleIamV1AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "GoogleIamV1AuditConfig", "properties": { - "resources": { - "description": "Required. A list of references to authorization extensions that will be invoked for requests matching this policy. Limited to 1 custom provider.", + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", "items": { - "type": "string" + "$ref": "GoogleIamV1AuditLogConfig" }, "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" } }, "type": "object" }, - "AuthzPolicyCustomProviderCloudIap": { - "description": "Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places.", - "id": "AuthzPolicyCustomProviderCloudIap", - "properties": {}, - "type": "object" - }, - "AuthzPolicyTarget": { - "description": "Specifies the set of targets to which this policy should be applied to.", - "id": "AuthzPolicyTarget", + "GoogleIamV1AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "GoogleIamV1AuditLogConfig", "properties": { - "loadBalancingScheme": { - "description": "Required. All gateways and forwarding rules referenced by this policy and extensions must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to [Backend services overview](https://cloud.google.com/load-balancing/docs/backend-service).", + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", "enum": [ - "LOAD_BALANCING_SCHEME_UNSPECIFIED", - "INTERNAL_MANAGED", - "EXTERNAL_MANAGED", - "INTERNAL_SELF_MANAGED" + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" ], "enumDescriptions": [ - "Default value. Do not use.", - "Signifies that this is used for Regional internal or Cross-region internal Application Load Balancing.", - "Signifies that this is used for Global external or Regional external Application Load Balancing.", - "Signifies that this is used for Cloud Service Mesh. Meant for use by CSM GKE controller only." + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" ], "type": "string" - }, - "resources": { - "description": "Required. A list of references to the Forwarding Rules on which this policy will be applied.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "id": "CancelOperationRequest", - "properties": {}, - "type": "object" - }, - "CertificateProviderInstance": { - "description": "Specification of a TLS certificate provider instance. Workloads may have one or more CertificateProvider instances (plugins) and one of them is enabled and configured by specifying this message. Workloads use the values from this message to locate and load the CertificateProvider instance configuration.", - "id": "CertificateProviderInstance", + "GoogleIamV1Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "GoogleIamV1Binding", "properties": { - "pluginInstance": { - "description": "Required. Plugin instance name, used to locate and load CertificateProvider instance configuration. Set to \"google_cloud_private_spiffe\" to use Certificate Authority Service certificate provider instance.", + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, "type": "object" }, - "ClientTlsPolicy": { - "description": "ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.", - "id": "ClientTlsPolicy", + "GoogleIamV1Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "GoogleIamV1Policy", "properties": { - "clientCertificate": { - "$ref": "GoogleCloudNetworksecurityV1beta1CertificateProvider", - "description": "Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS." - }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. Free-text description of the resource.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "GoogleIamV1AuditConfig" }, - "description": "Optional. Set of label tags associated with the resource.", - "type": "object" - }, - "name": { - "description": "Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`", - "type": "string" + "type": "array" }, - "serverValidationCa": { - "description": "Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.", + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", "items": { - "$ref": "ValidationCA" + "$ref": "GoogleIamV1Binding" }, "type": "array" }, - "sni": { - "description": "Optional. Server Name Indication string to present to the server during TLS handshake. E.g: \"secure.example.com\".", + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", "type": "string" }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "CloneAddressGroupItemsRequest": { - "description": "Request used by the CloneAddressGroupItems method.", - "id": "CloneAddressGroupItemsRequest", + "GoogleIamV1SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "GoogleIamV1SetIamPolicyRequest", "properties": { - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "type": "string" + "policy": { + "$ref": "GoogleIamV1Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." }, - "sourceAddressGroup": { - "description": "Required. Source address group to clone items from.", + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", "type": "string" } }, "type": "object" }, - "CustomMirroringProfile": { - "description": "CustomMirroringProfile defines an action for mirroring traffic to a collector's EndpointGroup", - "id": "CustomMirroringProfile", + "GoogleIamV1TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "GoogleIamV1TestIamPermissionsRequest", "properties": { - "mirroringEndpointGroup": { - "description": "Required. The MirroringEndpointGroup to which traffic associated with the SP should be mirrored.", - "type": "string" + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "Destination": { - "description": "Specification of traffic destination attributes.", - "id": "Destination", + "GoogleIamV1TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "GoogleIamV1TestIamPermissionsResponse", "properties": { - "hosts": { - "description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example \"*.myorg.com\") or a presence (any) match \"*\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "httpHeaderMatch": { - "$ref": "HttpHeaderMatch", - "description": "Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy." - }, - "methods": { - "description": "Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.", + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", "items": { "type": "string" }, "type": "array" - }, - "ports": { - "description": "Required. List of destination ports to match. At least one port should match.", - "items": { - "format": "uint32", - "type": "integer" - }, - "type": "array" } }, "type": "object" }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", - "id": "Empty", - "properties": {}, - "type": "object" - }, - "Expr": { - "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", - "id": "Expr", + "HttpHeaderMatch": { + "description": "Specification of HTTP header match attributes.", + "id": "HttpHeaderMatch", "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.", - "type": "string" - }, - "location": { - "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "headerName": { + "description": "Required. The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name \":authority\". For matching a request's method, use the headerName \":method\".", "type": "string" - }, - "title": { - "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + }, + "regexMatch": { + "description": "Required. The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to Host and a regular expression that satisfies the RFC2616 Host header's port specifier.", "type": "string" } }, "type": "object" }, - "FirewallEndpoint": { - "description": "Message describing Endpoint object", - "id": "FirewallEndpoint", + "InterceptDeployment": { + "description": "Message describing InterceptDeployment object", + "id": "InterceptDeployment", "properties": { - "associatedNetworks": { - "deprecated": true, - "description": "Output only. List of networks that are associated with this endpoint in the local zone. This is a projection of the FirewallEndpointAssociations pointing at this endpoint. A network will only appear in this list after traffic routing is fully configured. Format: projects/{project}/global/networks/{name}.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "associations": { - "description": "Output only. List of FirewallEndpointAssociations that are associated to this endpoint. An association will only appear in this list after traffic routing is fully configured.", - "items": { - "$ref": "FirewallEndpointAssociationReference" - }, - "readOnly": true, - "type": "array" - }, - "billingProjectId": { - "description": "Required. Project to bill on endpoint uptime usage.", - "type": "string" - }, "createTime": { - "description": "Output only. Create time stamp", + "description": "Output only. [Output only] Create time stamp", "format": "google-datetime", "readOnly": true, "type": "string" }, - "description": { - "description": "Optional. Description of the firewall endpoint. Max length 2048 characters.", + "forwardingRule": { + "description": "Required. Immutable. The regional load balancer which the intercepted traffic should be forwarded to. Format is: projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + "type": "string" + }, + "interceptDeploymentGroup": { + "description": "Required. Immutable. The Intercept Deployment Group that this resource is part of. Format is: `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDeploymentGroup}`", "type": "string" }, "labels": { @@ -4844,7 +6013,7 @@ "type": "object" }, "name": { - "description": "Immutable. Identifier. name of resource", + "description": "Immutable. Identifier. The name of the InterceptDeployment.", "type": "string" }, "reconciling": { @@ -4853,26 +6022,28 @@ "type": "boolean" }, "state": { - "description": "Output only. Current state of the endpoint.", + "description": "Output only. Current state of the deployment.", "enum": [ "STATE_UNSPECIFIED", - "CREATING", "ACTIVE", + "CREATING", "DELETING", - "INACTIVE" + "OUT_OF_SYNC", + "DELETE_FAILED" ], "enumDescriptions": [ "Not set.", + "Ready.", "Being created.", - "Processing configuration updates.", "Being deleted.", - "Down or in an error state." + "The underlying data plane is out of sync with the deployment. The deployment is not expected to be usable. This state can result in undefined behavior.", + "An attempt to delete the deployment has failed. This is a terminal state and the deployment is not expected to be usable as some of its resources have been deleted. The only permitted operation is to retry deleting the deployment." ], "readOnly": true, "type": "string" }, "updateTime": { - "description": "Output only. Update time stamp", + "description": "Output only. [Output only] Update time stamp", "format": "google-datetime", "readOnly": true, "type": "string" @@ -4880,24 +6051,24 @@ }, "type": "object" }, - "FirewallEndpointAssociation": { - "description": "Message describing Association object", - "id": "FirewallEndpointAssociation", + "InterceptDeploymentGroup": { + "description": "Message describing InterceptDeploymentGroup object", + "id": "InterceptDeploymentGroup", "properties": { + "connectedEndpointGroups": { + "description": "Output only. The list of Intercept Endpoint Groups that are connected to this resource.", + "items": { + "$ref": "InterceptDeploymentGroupConnectedEndpointGroup" + }, + "readOnly": true, + "type": "array" + }, "createTime": { - "description": "Output only. Create time stamp", + "description": "Output only. [Output only] Create time stamp", "format": "google-datetime", "readOnly": true, "type": "string" }, - "disabled": { - "description": "Optional. Whether the association is disabled. True indicates that traffic won't be intercepted", - "type": "boolean" - }, - "firewallEndpoint": { - "description": "Required. The URL of the FirewallEndpoint that is being associated.", - "type": "string" - }, "labels": { "additionalProperties": { "type": "string" @@ -4906,11 +6077,11 @@ "type": "object" }, "name": { - "description": "Immutable. Identifier. name of resource", + "description": "Immutable. Identifier. Then name of the InterceptDeploymentGroup.", "type": "string" }, "network": { - "description": "Required. The URL of the network that is being associated.", + "description": "Required. Immutable. The network that is being used for the deployment. Format is: projects/{project}/global/networks/{network}.", "type": "string" }, "reconciling": { @@ -4919,32 +6090,24 @@ "type": "boolean" }, "state": { - "description": "Output only. Current state of the association.", + "description": "Output only. Current state of the deployment group.", "enum": [ "STATE_UNSPECIFIED", - "CREATING", "ACTIVE", - "DELETING", - "INACTIVE", - "ORPHAN" + "CREATING", + "DELETING" ], "enumDescriptions": [ "Not set.", + "Ready.", "Being created.", - "Active and ready for traffic.", - "Being deleted.", - "Down or in an error state.", - "The project that housed the association has been deleted." + "Being deleted." ], "readOnly": true, "type": "string" }, - "tlsInspectionPolicy": { - "description": "Optional. The URL of the TlsInspectionPolicy that is being associated.", - "type": "string" - }, "updateTime": { - "description": "Output only. Update time stamp", + "description": "Output only. [Output only] Update time stamp", "format": "google-datetime", "readOnly": true, "type": "string" @@ -4952,297 +6115,228 @@ }, "type": "object" }, - "FirewallEndpointAssociationReference": { - "description": "This is a subset of the FirewallEndpointAssociation message, containing fields to be used by the consumer.", - "id": "FirewallEndpointAssociationReference", + "InterceptDeploymentGroupConnectedEndpointGroup": { + "description": "An endpoint group connected to this deployment group.", + "id": "InterceptDeploymentGroupConnectedEndpointGroup", "properties": { "name": { - "description": "Output only. The resource name of the FirewallEndpointAssociation. Format: projects/{project}/locations/{location}/firewallEndpointAssociations/{id}", - "readOnly": true, - "type": "string" - }, - "network": { - "description": "Output only. The VPC network associated. Format: projects/{project}/global/networks/{name}.", + "description": "Output only. A connected intercept endpoint group.", "readOnly": true, "type": "string" } }, "type": "object" }, - "GatewaySecurityPolicy": { - "description": "The GatewaySecurityPolicy resource contains a collection of GatewaySecurityPolicyRules and associated metadata.", - "id": "GatewaySecurityPolicy", + "InterceptEndpointGroup": { + "description": "Message describing InterceptEndpointGroup object.", + "id": "InterceptEndpointGroup", "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. Free-text description of the resource.", - "type": "string" - }, - "name": { - "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", - "type": "string" - }, - "tlsInspectionPolicy": { - "description": "Optional. Name of a TLS Inspection Policy resource that defines how TLS inspection will be performed for any rule(s) which enables it.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", + "associations": { + "description": "Output only. List of Intercept Endpoint Group Associations that are associated to this endpoint group.", + "items": { + "$ref": "InterceptEndpointGroupAssociationDetails" + }, "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GatewaySecurityPolicyRule": { - "description": "The GatewaySecurityPolicyRule resource is in a nested collection within a GatewaySecurityPolicy and represents a traffic matching condition and associated action to perform.", - "id": "GatewaySecurityPolicyRule", - "properties": { - "applicationMatcher": { - "description": "Optional. CEL expression for matching on L7/application level criteria.", - "type": "string" - }, - "basicProfile": { - "description": "Required. Profile which tells what the primitive action should be.", - "enum": [ - "BASIC_PROFILE_UNSPECIFIED", - "ALLOW", - "DENY" - ], - "enumDescriptions": [ - "If there is not a mentioned action for the target.", - "Allow the matched traffic.", - "Deny the matched traffic." - ], - "type": "string" + "type": "array" }, "createTime": { - "description": "Output only. Time when the rule was created.", + "description": "Output only. [Output only] Create time stamp", "format": "google-datetime", "readOnly": true, "type": "string" }, "description": { - "description": "Optional. Free-text description of the resource.", + "description": "Optional. User-provided description of the endpoint group. Used as additional context for the endpoint group.", "type": "string" }, - "enabled": { - "description": "Required. Whether the rule is enforced.", - "type": "boolean" - }, - "name": { - "description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "interceptDeploymentGroup": { + "description": "Required. Immutable. The Intercept Deployment Group that this resource is connected to. Format is: `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDeploymentGroup}`", "type": "string" }, - "priority": { - "description": "Required. Priority of the rule. Lower number corresponds to higher precedence.", - "format": "int32", - "type": "integer" + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs", + "type": "object" }, - "sessionMatcher": { - "description": "Required. CEL expression for matching on session criteria.", + "name": { + "description": "Immutable. Identifier. The name of the InterceptEndpointGroup.", "type": "string" }, - "tlsInspectionEnabled": { - "description": "Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.", - "type": "boolean" - }, - "updateTime": { - "description": "Output only. Time when the rule was updated.", - "format": "google-datetime", + "reconciling": { + "description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudNetworksecurityV1beta1CertificateProvider": { - "description": "Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.", - "id": "GoogleCloudNetworksecurityV1beta1CertificateProvider", - "properties": { - "certificateProviderInstance": { - "$ref": "CertificateProviderInstance", - "description": "The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information." - }, - "grpcEndpoint": { - "$ref": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", - "description": "gRPC specific configuration to access the gRPC server to obtain the cert and private key." - } - }, - "type": "object" - }, - "GoogleCloudNetworksecurityV1beta1GrpcEndpoint": { - "description": "Specification of the GRPC Endpoint.", - "id": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", - "properties": { - "targetUri": { - "description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with \"unix:\".", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", - "id": "GoogleIamV1AuditConfig", - "properties": { - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.", - "items": { - "$ref": "GoogleIamV1AuditLogConfig" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", - "id": "GoogleIamV1AuditLogConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" + "type": "boolean" }, - "logType": { - "description": "The log type that this config enables.", + "state": { + "description": "Output only. Current state of the endpoint group.", "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" + "STATE_UNSPECIFIED", + "ACTIVE", + "CLOSED", + "CREATING", + "DELETING", + "OUT_OF_SYNC", + "DELETE_FAILED" ], "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" + "Not set.", + "Ready.", + "The deployment group has been deleted and intercept is disabled.", + "Being created.", + "Being deleted.", + "The underlying data plane is out of sync with the endpoint group. Some associations might not be usable.", + "An attempt to delete the endpoint group has failed. This is a terminal state and the endpoint group is not expected to be usable as some of its resources have been deleted. The only permitted operation is to retry deleting the endpoint group." ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. [Output only] Update time stamp", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleIamV1Binding": { - "description": "Associates `members`, or principals, with a `role`.", - "id": "GoogleIamV1Binding", + "InterceptEndpointGroupAssociation": { + "description": "Message describing InterceptEndpointGroupAssociation object", + "id": "InterceptEndpointGroupAssociation", "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + "createTime": { + "description": "Output only. [Output only] Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", - "items": { + "interceptEndpointGroup": { + "description": "Required. Immutable. The Intercept Endpoint Group that this resource is connected to. Format is: `projects/{project}/locations/global/interceptEndpointGroups/{interceptEndpointGroup}`", + "type": "string" + }, + "labels": { + "additionalProperties": { "type": "string" }, - "type": "array" + "description": "Optional. Labels as key value pairs", + "type": "object" }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", - "id": "GoogleIamV1Policy", - "properties": { - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", + "locationsDetails": { + "description": "Output only. The list of locations that this association is in and its details.", "items": { - "$ref": "GoogleIamV1AuditConfig" + "$ref": "InterceptEndpointGroupAssociationLocationDetails" }, + "readOnly": true, "type": "array" }, - "bindings": { - "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", - "items": { - "$ref": "GoogleIamV1Binding" - }, - "type": "array" + "name": { + "description": "Immutable. Identifier. The name of the InterceptEndpointGroupAssociation.", + "type": "string" }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", - "format": "byte", + "network": { + "description": "Required. Immutable. The VPC network associated. Format: projects/{project}/global/networks/{network}.", "type": "string" }, - "version": { - "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleIamV1SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "id": "GoogleIamV1SetIamPolicyRequest", - "properties": { - "policy": { - "$ref": "GoogleIamV1Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + "reconciling": { + "description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", + "readOnly": true, + "type": "boolean" }, - "updateMask": { - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", - "format": "google-fieldmask", + "state": { + "description": "Output only. Current state of the endpoint group association.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "CLOSED", + "OUT_OF_SYNC", + "DELETE_FAILED" + ], + "enumDescriptions": [ + "Not set.", + "Ready.", + "Being created.", + "Being deleted.", + "Intercept is disabled due to an operation on another resource.", + "The underlying data plane is out of sync with the association. The association is not expected to be usable. This state can result in undefined behavior. See the `locations_details` field for more details.", + "An attempt to delete the association has failed. This is a terminal state and the association is not expected to be usable as some of its resources have been deleted. The only permitted operation is to retry deleting the association." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. [Output only] Update time stamp", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleIamV1TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "id": "GoogleIamV1TestIamPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleIamV1TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "id": "GoogleIamV1TestIamPermissionsResponse", + "InterceptEndpointGroupAssociationDetails": { + "description": "This is a subset of the InterceptEndpointGroupAssociation message, containing fields to be used by the consumer.", + "id": "InterceptEndpointGroupAssociationDetails", "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - }, - "type": "array" + "name": { + "description": "Output only. The resource name of the InterceptEndpointGroupAssociation. Format: projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{interceptEndpointGroupAssociation}", + "readOnly": true, + "type": "string" + }, + "network": { + "description": "Output only. The VPC network associated. Format: projects/{project}/global/networks/{name}.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Current state of the association.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "CLOSED", + "OUT_OF_SYNC", + "DELETE_FAILED" + ], + "enumDescriptions": [ + "Not set.", + "Ready.", + "Being created.", + "Being deleted.", + "Intercept is disabled due to an operation on another resource.", + "The underlying data plane is out of sync with the association. The association is not expected to be usable. This state can result in undefined behavior. See the `locations_details` field for more details.", + "An attempt to delete the association has failed. This is a terminal state and the association is not expected to be usable as some of its resources have been deleted. The only permitted operation is to retry deleting the association." + ], + "readOnly": true, + "type": "string" } }, "type": "object" }, - "HttpHeaderMatch": { - "description": "Specification of HTTP header match attributes.", - "id": "HttpHeaderMatch", + "InterceptEndpointGroupAssociationLocationDetails": { + "description": "Details about the association status in a specific cloud location.", + "id": "InterceptEndpointGroupAssociationLocationDetails", "properties": { - "headerName": { - "description": "Required. The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name \":authority\". For matching a request's method, use the headerName \":method\".", + "location": { + "description": "Output only. The cloud location.", + "readOnly": true, "type": "string" }, - "regexMatch": { - "description": "Required. The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to Host and a regular expression that satisfies the RFC2616 Host header's port specifier.", + "state": { + "description": "Output only. The association state in this location.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "OUT_OF_SYNC" + ], + "enumDescriptions": [ + "Not set.", + "Ready.", + "The data plane is out of sync with the association in this location." + ], + "readOnly": true, "type": "string" } }, @@ -5465,6 +6559,85 @@ }, "type": "object" }, + "ListInterceptDeploymentGroupsResponse": { + "description": "Message for response to listing InterceptDeploymentGroups", + "id": "ListInterceptDeploymentGroupsResponse", + "properties": { + "interceptDeploymentGroups": { + "description": "The list of InterceptDeploymentGroup", + "items": { + "$ref": "InterceptDeploymentGroup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListInterceptDeploymentsResponse": { + "description": "Message for response to listing InterceptDeployments", + "id": "ListInterceptDeploymentsResponse", + "properties": { + "interceptDeployments": { + "description": "The list of InterceptDeployment", + "items": { + "$ref": "InterceptDeployment" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListInterceptEndpointGroupAssociationsResponse": { + "description": "Message for response to listing InterceptEndpointGroupAssociations", + "id": "ListInterceptEndpointGroupAssociationsResponse", + "properties": { + "interceptEndpointGroupAssociations": { + "description": "The list of InterceptEndpointGroupAssociation", + "items": { + "$ref": "InterceptEndpointGroupAssociation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListInterceptEndpointGroupsResponse": { + "description": "Message for response to listing InterceptEndpointGroups", + "id": "ListInterceptEndpointGroupsResponse", + "properties": { + "interceptEndpointGroups": { + "description": "The list of InterceptEndpointGroup", + "items": { + "$ref": "InterceptEndpointGroup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -5815,7 +6988,7 @@ "type": "object" }, "MirroringDeploymentGroup": { - "description": "Message describing MirroringDeploymentGroup object", + "description": "Message describing MirroringDeploymentGroup object NEXT ID: 10", "id": "MirroringDeploymentGroup", "properties": { "connectedEndpointGroups": { @@ -6172,7 +7345,7 @@ "type": "object" }, "SecurityProfile": { - "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes. Next ID: 12", + "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes.", "id": "SecurityProfile", "properties": { "createTime": { @@ -6181,6 +7354,10 @@ "readOnly": true, "type": "string" }, + "customInterceptProfile": { + "$ref": "CustomInterceptProfile", + "description": "The custom TPPI configuration for the SecurityProfile." + }, "customMirroringProfile": { "$ref": "CustomMirroringProfile", "description": "The custom Packet Mirroring v2 configuration for the SecurityProfile." @@ -6214,12 +7391,14 @@ "enum": [ "PROFILE_TYPE_UNSPECIFIED", "THREAT_PREVENTION", - "CUSTOM_MIRRORING" + "CUSTOM_MIRRORING", + "CUSTOM_INTERCEPT" ], "enumDescriptions": [ "Profile type not specified.", "Profile type for threat prevention.", - "Profile type for packet mirroring v2" + "Profile type for packet mirroring v2", + "Profile type for TPPI." ], "type": "string" }, @@ -6233,7 +7412,7 @@ "type": "object" }, "SecurityProfileGroup": { - "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes. Next ID: 11", + "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes.", "id": "SecurityProfileGroup", "properties": { "createTime": { @@ -6242,6 +7421,10 @@ "readOnly": true, "type": "string" }, + "customInterceptProfile": { + "description": "Optional. Reference to a SecurityProfile with the CustomIntercept configuration.", + "type": "string" + }, "customMirroringProfile": { "description": "Optional. Reference to a SecurityProfile with the CustomMirroring configuration.", "type": "string" diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index 771055a563c..8a16220b089 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -258,6 +258,10 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.ClientTlsPolicies = NewProjectsLocationsClientTlsPoliciesService(s) rs.FirewallEndpointAssociations = NewProjectsLocationsFirewallEndpointAssociationsService(s) rs.GatewaySecurityPolicies = NewProjectsLocationsGatewaySecurityPoliciesService(s) + rs.InterceptDeploymentGroups = NewProjectsLocationsInterceptDeploymentGroupsService(s) + rs.InterceptDeployments = NewProjectsLocationsInterceptDeploymentsService(s) + rs.InterceptEndpointGroupAssociations = NewProjectsLocationsInterceptEndpointGroupAssociationsService(s) + rs.InterceptEndpointGroups = NewProjectsLocationsInterceptEndpointGroupsService(s) rs.MirroringDeploymentGroups = NewProjectsLocationsMirroringDeploymentGroupsService(s) rs.MirroringDeployments = NewProjectsLocationsMirroringDeploymentsService(s) rs.MirroringEndpointGroupAssociations = NewProjectsLocationsMirroringEndpointGroupAssociationsService(s) @@ -284,6 +288,14 @@ type ProjectsLocationsService struct { GatewaySecurityPolicies *ProjectsLocationsGatewaySecurityPoliciesService + InterceptDeploymentGroups *ProjectsLocationsInterceptDeploymentGroupsService + + InterceptDeployments *ProjectsLocationsInterceptDeploymentsService + + InterceptEndpointGroupAssociations *ProjectsLocationsInterceptEndpointGroupAssociationsService + + InterceptEndpointGroups *ProjectsLocationsInterceptEndpointGroupsService + MirroringDeploymentGroups *ProjectsLocationsMirroringDeploymentGroupsService MirroringDeployments *ProjectsLocationsMirroringDeploymentsService @@ -367,6 +379,42 @@ type ProjectsLocationsGatewaySecurityPoliciesRulesService struct { s *Service } +func NewProjectsLocationsInterceptDeploymentGroupsService(s *Service) *ProjectsLocationsInterceptDeploymentGroupsService { + rs := &ProjectsLocationsInterceptDeploymentGroupsService{s: s} + return rs +} + +type ProjectsLocationsInterceptDeploymentGroupsService struct { + s *Service +} + +func NewProjectsLocationsInterceptDeploymentsService(s *Service) *ProjectsLocationsInterceptDeploymentsService { + rs := &ProjectsLocationsInterceptDeploymentsService{s: s} + return rs +} + +type ProjectsLocationsInterceptDeploymentsService struct { + s *Service +} + +func NewProjectsLocationsInterceptEndpointGroupAssociationsService(s *Service) *ProjectsLocationsInterceptEndpointGroupAssociationsService { + rs := &ProjectsLocationsInterceptEndpointGroupAssociationsService{s: s} + return rs +} + +type ProjectsLocationsInterceptEndpointGroupAssociationsService struct { + s *Service +} + +func NewProjectsLocationsInterceptEndpointGroupsService(s *Service) *ProjectsLocationsInterceptEndpointGroupsService { + rs := &ProjectsLocationsInterceptEndpointGroupsService{s: s} + return rs +} + +type ProjectsLocationsInterceptEndpointGroupsService struct { + s *Service +} + func NewProjectsLocationsMirroringDeploymentGroupsService(s *Service) *ProjectsLocationsMirroringDeploymentGroupsService { rs := &ProjectsLocationsMirroringDeploymentGroupsService{s: s} return rs @@ -657,9 +705,9 @@ func (s AuthzPolicy) MarshalJSON() ([]byte, error) { // AuthzPolicyAuthzRule: Conditions to match against the incoming request. type AuthzPolicyAuthzRule struct { - // From: Optional. Describes properties of one or more sources of a request. + // From: Optional. Describes properties of a source of a request. From *AuthzPolicyAuthzRuleFrom `json:"from,omitempty"` - // To: Optional. Describes properties of one or more targets of a request. + // To: Optional. Describes properties of a target of a request. To *AuthzPolicyAuthzRuleTo `json:"to,omitempty"` // When: Optional. CEL expression that describes the conditions to be satisfied // for the action. The result of the CEL expression is ANDed with the from and @@ -691,8 +739,8 @@ type AuthzPolicyAuthzRuleFrom struct { // this field. At least one of sources or notSources must be specified. NotSources []*AuthzPolicyAuthzRuleFromRequestSource `json:"notSources,omitempty"` // Sources: Optional. Describes the properties of a request's sources. At least - // one of sources or notSources must be specified. Limited to 5 sources. A - // match occurs when ANY source (in sources or notSources) matches the request. + // one of sources or notSources must be specified. Limited to 1 source. A match + // occurs when ANY source (in sources or notSources) matches the request. // Within a single source, the match follows AND semantics across fields and OR // semantics within a single field, i.e. a match occurs when ANY principal // matches AND ANY ipBlocks match. @@ -877,7 +925,7 @@ type AuthzPolicyAuthzRuleTo struct { NotOperations []*AuthzPolicyAuthzRuleToRequestOperation `json:"notOperations,omitempty"` // Operations: Optional. Describes properties of one or more targets of a // request. At least one of operations or notOperations must be specified. - // Limited to 5 operations. A match occurs when ANY operation (in operations or + // Limited to 1 operation. A match occurs when ANY operation (in operations or // notOperations) matches. Within an operation, the match follows AND semantics // across fields and OR semantics within a field, i.e. a match occurs when ANY // path matches AND ANY header matches and ANY method matches. @@ -1185,6 +1233,31 @@ func (s CloneAddressGroupItemsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CustomInterceptProfile: CustomInterceptProfile defines the Packet Intercept +// Endpoint Group used to intercept traffic to a third-party firewall in a +// Firewall rule. +type CustomInterceptProfile struct { + // InterceptEndpointGroup: Required. The InterceptEndpointGroup to which + // traffic associated with the SP should be mirrored. + InterceptEndpointGroup string `json:"interceptEndpointGroup,omitempty"` + // ForceSendFields is a list of field names (e.g. "InterceptEndpointGroup") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InterceptEndpointGroup") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CustomInterceptProfile) MarshalJSON() ([]byte, error) { + type NoMethod CustomInterceptProfile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CustomMirroringProfile: CustomMirroringProfile defines an action for // mirroring traffic to a collector's EndpointGroup type CustomMirroringProfile struct { @@ -1977,131 +2050,463 @@ func (s HttpHeaderMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAddressGroupReferencesResponse: Response of the -// ListAddressGroupReferences method. -type ListAddressGroupReferencesResponse struct { - // AddressGroupReferences: A list of references that matches the specified - // filter in the request. - AddressGroupReferences []*ListAddressGroupReferencesResponseAddressGroupReference `json:"addressGroupReferences,omitempty"` - // NextPageToken: If there might be more results than those appearing in this - // response, then `next_page_token` is included. To get the next set of - // results, call this method again using the value of `next_page_token` as - // `page_token`. - NextPageToken string `json:"nextPageToken,omitempty"` +// InterceptDeployment: Message describing InterceptDeployment object +type InterceptDeployment struct { + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // ForwardingRule: Required. Immutable. The regional load balancer which the + // intercepted traffic should be forwarded to. Format is: + // projects/{project}/regions/{region}/forwardingRules/{forwardingRule} + ForwardingRule string `json:"forwardingRule,omitempty"` + // InterceptDeploymentGroup: Required. Immutable. The Intercept Deployment + // Group that this resource is part of. Format is: + // `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDepl + // oymentGroup}` + InterceptDeploymentGroup string `json:"interceptDeploymentGroup,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // Name: Immutable. Identifier. The name of the InterceptDeployment. + Name string `json:"name,omitempty"` + // Reconciling: Output only. Whether reconciling is in progress, recommended + // per https://google.aip.dev/128. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. Current state of the deployment. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + // "OUT_OF_SYNC" - The underlying data plane is out of sync with the + // deployment. The deployment is not expected to be usable. This state can + // result in undefined behavior. + // "DELETE_FAILED" - An attempt to delete the deployment has failed. This is + // a terminal state and the deployment is not expected to be usable as some of + // its resources have been deleted. The only permitted operation is to retry + // deleting the deployment. + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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. "AddressGroupReferences") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressGroupReferences") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListAddressGroupReferencesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAddressGroupReferencesResponse +func (s InterceptDeployment) MarshalJSON() ([]byte, error) { + type NoMethod InterceptDeployment return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAddressGroupReferencesResponseAddressGroupReference: The Reference of -// AddressGroup. -type ListAddressGroupReferencesResponseAddressGroupReference struct { - // FirewallPolicy: FirewallPolicy that is using the Address Group. - FirewallPolicy string `json:"firewallPolicy,omitempty"` - // RulePriority: Rule priority of the FirewallPolicy that is using the Address - // Group. - RulePriority int64 `json:"rulePriority,omitempty"` - // SecurityPolicy: Cloud Armor SecurityPolicy that is using the Address Group. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicy") to +// InterceptDeploymentGroup: Message describing InterceptDeploymentGroup object +type InterceptDeploymentGroup struct { + // ConnectedEndpointGroups: Output only. The list of Intercept Endpoint Groups + // that are connected to this resource. + ConnectedEndpointGroups []*InterceptDeploymentGroupConnectedEndpointGroup `json:"connectedEndpointGroups,omitempty"` + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // Name: Immutable. Identifier. Then name of the InterceptDeploymentGroup. + Name string `json:"name,omitempty"` + // Network: Required. Immutable. The network that is being used for the + // deployment. Format is: projects/{project}/global/networks/{network}. + Network string `json:"network,omitempty"` + // Reconciling: Output only. Whether reconciling is in progress, recommended + // per https://google.aip.dev/128. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. Current state of the deployment group. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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. "ConnectedEndpointGroups") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ConnectedEndpointGroups") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListAddressGroupReferencesResponseAddressGroupReference) MarshalJSON() ([]byte, error) { - type NoMethod ListAddressGroupReferencesResponseAddressGroupReference +func (s InterceptDeploymentGroup) MarshalJSON() ([]byte, error) { + type NoMethod InterceptDeploymentGroup return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAddressGroupsResponse: Response returned by the ListAddressGroups -// method. -type ListAddressGroupsResponse struct { - // AddressGroups: List of AddressGroups resources. - AddressGroups []*AddressGroup `json:"addressGroups,omitempty"` - // NextPageToken: If there might be more results than those appearing in this - // response, then `next_page_token` is included. To get the next set of - // results, call this method again using the value of `next_page_token` as - // `page_token`. - NextPageToken string `json:"nextPageToken,omitempty"` +// InterceptDeploymentGroupConnectedEndpointGroup: An endpoint group connected +// to this deployment group. +type InterceptDeploymentGroupConnectedEndpointGroup struct { + // Name: Output only. A connected intercept endpoint group. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InterceptDeploymentGroupConnectedEndpointGroup) MarshalJSON() ([]byte, error) { + type NoMethod InterceptDeploymentGroupConnectedEndpointGroup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// InterceptEndpointGroup: Message describing InterceptEndpointGroup object. +type InterceptEndpointGroup struct { + // Associations: Output only. List of Intercept Endpoint Group Associations + // that are associated to this endpoint group. + Associations []*InterceptEndpointGroupAssociationDetails `json:"associations,omitempty"` + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. User-provided description of the endpoint group. Used + // as additional context for the endpoint group. + Description string `json:"description,omitempty"` + // InterceptDeploymentGroup: Required. Immutable. The Intercept Deployment + // Group that this resource is connected to. Format is: + // `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDepl + // oymentGroup}` + InterceptDeploymentGroup string `json:"interceptDeploymentGroup,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // Name: Immutable. Identifier. The name of the InterceptEndpointGroup. + Name string `json:"name,omitempty"` + // Reconciling: Output only. Whether reconciling is in progress, recommended + // per https://google.aip.dev/128. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. Current state of the endpoint group. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CLOSED" - The deployment group has been deleted and intercept is + // disabled. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + // "OUT_OF_SYNC" - The underlying data plane is out of sync with the endpoint + // group. Some associations might not be usable. + // "DELETE_FAILED" - An attempt to delete the endpoint group has failed. This + // is a terminal state and the endpoint group is not expected to be usable as + // some of its resources have been deleted. The only permitted operation is to + // retry deleting the endpoint group. + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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. "AddressGroups") to + // ForceSendFields is a list of field names (e.g. "Associations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressGroups") to include in API + // NullFields is a list of field names (e.g. "Associations") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListAddressGroupsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAddressGroupsResponse +func (s InterceptEndpointGroup) MarshalJSON() ([]byte, error) { + type NoMethod InterceptEndpointGroup return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAuthorizationPoliciesResponse: Response returned by the -// ListAuthorizationPolicies method. -type ListAuthorizationPoliciesResponse struct { - // AuthorizationPolicies: List of AuthorizationPolicies resources. - AuthorizationPolicies []*AuthorizationPolicy `json:"authorizationPolicies,omitempty"` - // NextPageToken: If there might be more results than those appearing in this - // response, then `next_page_token` is included. To get the next set of - // results, call this method again using the value of `next_page_token` as - // `page_token`. - NextPageToken string `json:"nextPageToken,omitempty"` +// InterceptEndpointGroupAssociation: Message describing +// InterceptEndpointGroupAssociation object +type InterceptEndpointGroupAssociation struct { + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // InterceptEndpointGroup: Required. Immutable. The Intercept Endpoint Group + // that this resource is connected to. Format is: + // `projects/{project}/locations/global/interceptEndpointGroups/{interceptEndpoi + // ntGroup}` + InterceptEndpointGroup string `json:"interceptEndpointGroup,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // LocationsDetails: Output only. The list of locations that this association + // is in and its details. + LocationsDetails []*InterceptEndpointGroupAssociationLocationDetails `json:"locationsDetails,omitempty"` + // Name: Immutable. Identifier. The name of the + // InterceptEndpointGroupAssociation. + Name string `json:"name,omitempty"` + // Network: Required. Immutable. The VPC network associated. Format: + // projects/{project}/global/networks/{network}. + Network string `json:"network,omitempty"` + // Reconciling: Output only. Whether reconciling is in progress, recommended + // per https://google.aip.dev/128. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. Current state of the endpoint group association. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + // "CLOSED" - Intercept is disabled due to an operation on another resource. + // "OUT_OF_SYNC" - The underlying data plane is out of sync with the + // association. The association is not expected to be usable. This state can + // result in undefined behavior. See the `locations_details` field for more + // details. + // "DELETE_FAILED" - An attempt to delete the association has failed. This is + // a terminal state and the association is not expected to be usable as some of + // its resources have been deleted. The only permitted operation is to retry + // deleting the association. + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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. "AuthorizationPolicies") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthorizationPolicies") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListAuthorizationPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAuthorizationPoliciesResponse +func (s InterceptEndpointGroupAssociation) MarshalJSON() ([]byte, error) { + type NoMethod InterceptEndpointGroupAssociation return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAuthzPoliciesResponse: Message for response to listing `AuthzPolicy` -// resources. -type ListAuthzPoliciesResponse struct { +// InterceptEndpointGroupAssociationDetails: This is a subset of the +// InterceptEndpointGroupAssociation message, containing fields to be used by +// the consumer. +type InterceptEndpointGroupAssociationDetails struct { + // Name: Output only. The resource name of the + // InterceptEndpointGroupAssociation. Format: + // projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{i + // nterceptEndpointGroupAssociation} + Name string `json:"name,omitempty"` + // Network: Output only. The VPC network associated. Format: + // projects/{project}/global/networks/{name}. + Network string `json:"network,omitempty"` + // State: Output only. Current state of the association. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + // "CLOSED" - Intercept is disabled due to an operation on another resource. + // "OUT_OF_SYNC" - The underlying data plane is out of sync with the + // association. The association is not expected to be usable. This state can + // result in undefined behavior. See the `locations_details` field for more + // details. + // "DELETE_FAILED" - An attempt to delete the association has failed. This is + // a terminal state and the association is not expected to be usable as some of + // its resources have been deleted. The only permitted operation is to retry + // deleting the association. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InterceptEndpointGroupAssociationDetails) MarshalJSON() ([]byte, error) { + type NoMethod InterceptEndpointGroupAssociationDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// InterceptEndpointGroupAssociationLocationDetails: Details about the +// association status in a specific cloud location. +type InterceptEndpointGroupAssociationLocationDetails struct { + // Location: Output only. The cloud location. + Location string `json:"location,omitempty"` + // State: Output only. The association state in this location. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "OUT_OF_SYNC" - The data plane is out of sync with the association in this + // location. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InterceptEndpointGroupAssociationLocationDetails) MarshalJSON() ([]byte, error) { + type NoMethod InterceptEndpointGroupAssociationLocationDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAddressGroupReferencesResponse: Response of the +// ListAddressGroupReferences method. +type ListAddressGroupReferencesResponse struct { + // AddressGroupReferences: A list of references that matches the specified + // filter in the request. + AddressGroupReferences []*ListAddressGroupReferencesResponseAddressGroupReference `json:"addressGroupReferences,omitempty"` + // NextPageToken: If there might be more results than those appearing in this + // response, then `next_page_token` is included. To get the next set of + // results, call this method again using the value of `next_page_token` as + // `page_token`. + 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. "AddressGroupReferences") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AddressGroupReferences") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAddressGroupReferencesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupReferencesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAddressGroupReferencesResponseAddressGroupReference: The Reference of +// AddressGroup. +type ListAddressGroupReferencesResponseAddressGroupReference struct { + // FirewallPolicy: FirewallPolicy that is using the Address Group. + FirewallPolicy string `json:"firewallPolicy,omitempty"` + // RulePriority: Rule priority of the FirewallPolicy that is using the Address + // Group. + RulePriority int64 `json:"rulePriority,omitempty"` + // SecurityPolicy: Cloud Armor SecurityPolicy that is using the Address Group. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. "FirewallPolicy") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FirewallPolicy") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAddressGroupReferencesResponseAddressGroupReference) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupReferencesResponseAddressGroupReference + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAddressGroupsResponse: Response returned by the ListAddressGroups +// method. +type ListAddressGroupsResponse struct { + // AddressGroups: List of AddressGroups resources. + AddressGroups []*AddressGroup `json:"addressGroups,omitempty"` + // NextPageToken: If there might be more results than those appearing in this + // response, then `next_page_token` is included. To get the next set of + // results, call this method again using the value of `next_page_token` as + // `page_token`. + 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. "AddressGroups") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AddressGroups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAddressGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAuthorizationPoliciesResponse: Response returned by the +// ListAuthorizationPolicies method. +type ListAuthorizationPoliciesResponse struct { + // AuthorizationPolicies: List of AuthorizationPolicies resources. + AuthorizationPolicies []*AuthorizationPolicy `json:"authorizationPolicies,omitempty"` + // NextPageToken: If there might be more results than those appearing in this + // response, then `next_page_token` is included. To get the next set of + // results, call this method again using the value of `next_page_token` as + // `page_token`. + 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. "AuthorizationPolicies") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuthorizationPolicies") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAuthorizationPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAuthorizationPoliciesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAuthzPoliciesResponse: Message for response to listing `AuthzPolicy` +// resources. +type ListAuthzPoliciesResponse struct { // AuthzPolicies: The list of `AuthzPolicy` resources. AuthzPolicies []*AuthzPolicy `json:"authzPolicies,omitempty"` // NextPageToken: A token identifying a page of results that the server @@ -2288,68 +2693,40 @@ func (s ListGatewaySecurityPolicyRulesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in the - // request. - Locations []*Location `json:"locations,omitempty"` - // NextPageToken: The standard List next-page token. - 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. "Locations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListMirroringDeploymentGroupsResponse: Message for response to listing -// MirroringDeploymentGroups -type ListMirroringDeploymentGroupsResponse struct { - // MirroringDeploymentGroups: The list of MirroringDeploymentGroup - MirroringDeploymentGroups []*MirroringDeploymentGroup `json:"mirroringDeploymentGroups,omitempty"` +// ListInterceptDeploymentGroupsResponse: Message for response to listing +// InterceptDeploymentGroups +type ListInterceptDeploymentGroupsResponse struct { + // InterceptDeploymentGroups: The list of InterceptDeploymentGroup + InterceptDeploymentGroups []*InterceptDeploymentGroup `json:"interceptDeploymentGroups,omitempty"` // NextPageToken: A token identifying a page of results the server should // return. 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. "MirroringDeploymentGroups") + // ForceSendFields is a list of field names (e.g. "InterceptDeploymentGroups") // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MirroringDeploymentGroups") to + // NullFields is a list of field names (e.g. "InterceptDeploymentGroups") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListMirroringDeploymentGroupsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMirroringDeploymentGroupsResponse +func (s ListInterceptDeploymentGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInterceptDeploymentGroupsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListMirroringDeploymentsResponse: Message for response to listing -// MirroringDeployments -type ListMirroringDeploymentsResponse struct { - // MirroringDeployments: The list of MirroringDeployment - MirroringDeployments []*MirroringDeployment `json:"mirroringDeployments,omitempty"` +// ListInterceptDeploymentsResponse: Message for response to listing +// InterceptDeployments +type ListInterceptDeploymentsResponse struct { + // InterceptDeployments: The list of InterceptDeployment + InterceptDeployments []*InterceptDeployment `json:"interceptDeployments,omitempty"` // NextPageToken: A token identifying a page of results the server should // return. NextPageToken string `json:"nextPageToken,omitempty"` @@ -2358,30 +2735,30 @@ type ListMirroringDeploymentsResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "MirroringDeployments") to + // ForceSendFields is a list of field names (e.g. "InterceptDeployments") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MirroringDeployments") to include + // NullFields is a list of field names (e.g. "InterceptDeployments") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListMirroringDeploymentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMirroringDeploymentsResponse +func (s ListInterceptDeploymentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInterceptDeploymentsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListMirroringEndpointGroupAssociationsResponse: Message for response to -// listing MirroringEndpointGroupAssociations -type ListMirroringEndpointGroupAssociationsResponse struct { - // MirroringEndpointGroupAssociations: The list of - // MirroringEndpointGroupAssociation - MirroringEndpointGroupAssociations []*MirroringEndpointGroupAssociation `json:"mirroringEndpointGroupAssociations,omitempty"` +// ListInterceptEndpointGroupAssociationsResponse: Message for response to +// listing InterceptEndpointGroupAssociations +type ListInterceptEndpointGroupAssociationsResponse struct { + // InterceptEndpointGroupAssociations: The list of + // InterceptEndpointGroupAssociation + InterceptEndpointGroupAssociations []*InterceptEndpointGroupAssociation `json:"interceptEndpointGroupAssociations,omitempty"` // NextPageToken: A token identifying a page of results the server should // return. NextPageToken string `json:"nextPageToken,omitempty"` @@ -2389,57 +2766,206 @@ type ListMirroringEndpointGroupAssociationsResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. - // "MirroringEndpointGroupAssociations") to unconditionally include in API + // "InterceptEndpointGroupAssociations") to unconditionally include in API // requests. By default, fields with empty or default values are omitted from // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "MirroringEndpointGroupAssociations") to include in API requests with the + // "InterceptEndpointGroupAssociations") to include in API requests with the // JSON null value. By default, fields with empty values are omitted from API // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for // more details. NullFields []string `json:"-"` } -func (s ListMirroringEndpointGroupAssociationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMirroringEndpointGroupAssociationsResponse +func (s ListInterceptEndpointGroupAssociationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInterceptEndpointGroupAssociationsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListMirroringEndpointGroupsResponse: Message for response to listing -// MirroringEndpointGroups -type ListMirroringEndpointGroupsResponse struct { - // MirroringEndpointGroups: The list of MirroringEndpointGroup - MirroringEndpointGroups []*MirroringEndpointGroup `json:"mirroringEndpointGroups,omitempty"` +// ListInterceptEndpointGroupsResponse: Message for response to listing +// InterceptEndpointGroups +type ListInterceptEndpointGroupsResponse struct { + // InterceptEndpointGroups: The list of InterceptEndpointGroup + InterceptEndpointGroups []*InterceptEndpointGroup `json:"interceptEndpointGroups,omitempty"` // NextPageToken: A token identifying a page of results the server should // return. 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. "MirroringEndpointGroups") to + // ForceSendFields is a list of field names (e.g. "InterceptEndpointGroups") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MirroringEndpointGroups") to + // NullFields is a list of field names (e.g. "InterceptEndpointGroups") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListMirroringEndpointGroupsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMirroringEndpointGroupsResponse +func (s ListInterceptEndpointGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInterceptEndpointGroupsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. +// ListLocationsResponse: The response message for Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. + 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. "Locations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Locations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMirroringDeploymentGroupsResponse: Message for response to listing +// MirroringDeploymentGroups +type ListMirroringDeploymentGroupsResponse struct { + // MirroringDeploymentGroups: The list of MirroringDeploymentGroup + MirroringDeploymentGroups []*MirroringDeploymentGroup `json:"mirroringDeploymentGroups,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "MirroringDeploymentGroups") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MirroringDeploymentGroups") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListMirroringDeploymentGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMirroringDeploymentGroupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMirroringDeploymentsResponse: Message for response to listing +// MirroringDeployments +type ListMirroringDeploymentsResponse struct { + // MirroringDeployments: The list of MirroringDeployment + MirroringDeployments []*MirroringDeployment `json:"mirroringDeployments,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "MirroringDeployments") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MirroringDeployments") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListMirroringDeploymentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMirroringDeploymentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMirroringEndpointGroupAssociationsResponse: Message for response to +// listing MirroringEndpointGroupAssociations +type ListMirroringEndpointGroupAssociationsResponse struct { + // MirroringEndpointGroupAssociations: The list of + // MirroringEndpointGroupAssociation + MirroringEndpointGroupAssociations []*MirroringEndpointGroupAssociation `json:"mirroringEndpointGroupAssociations,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. + // "MirroringEndpointGroupAssociations") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "MirroringEndpointGroupAssociations") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s ListMirroringEndpointGroupAssociationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMirroringEndpointGroupAssociationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMirroringEndpointGroupsResponse: Message for response to listing +// MirroringEndpointGroups +type ListMirroringEndpointGroupsResponse struct { + // MirroringEndpointGroups: The list of MirroringEndpointGroup + MirroringEndpointGroups []*MirroringEndpointGroup `json:"mirroringEndpointGroups,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "MirroringEndpointGroups") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MirroringEndpointGroups") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListMirroringEndpointGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMirroringEndpointGroupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. NextPageToken string `json:"nextPageToken,omitempty"` // Operations: A list of operations that matches the specified filter in the // request. @@ -2770,6 +3296,7 @@ func (s MirroringDeployment) MarshalJSON() ([]byte, error) { } // MirroringDeploymentGroup: Message describing MirroringDeploymentGroup object +// NEXT ID: 10 type MirroringDeploymentGroup struct { // ConnectedEndpointGroups: Output only. The list of Mirroring Endpoint Groups // that are connected to this resource. @@ -3143,10 +3670,13 @@ func (s Rule) MarshalJSON() ([]byte, error) { } // SecurityProfile: SecurityProfile is a resource that defines the behavior for -// one of many ProfileTypes. Next ID: 12 +// one of many ProfileTypes. type SecurityProfile struct { // CreateTime: Output only. Resource creation timestamp. CreateTime string `json:"createTime,omitempty"` + // CustomInterceptProfile: The custom TPPI configuration for the + // SecurityProfile. + CustomInterceptProfile *CustomInterceptProfile `json:"customInterceptProfile,omitempty"` // CustomMirroringProfile: The custom Packet Mirroring v2 configuration for the // SecurityProfile. CustomMirroringProfile *CustomMirroringProfile `json:"customMirroringProfile,omitempty"` @@ -3174,6 +3704,7 @@ type SecurityProfile struct { // "PROFILE_TYPE_UNSPECIFIED" - Profile type not specified. // "THREAT_PREVENTION" - Profile type for threat prevention. // "CUSTOM_MIRRORING" - Profile type for packet mirroring v2 + // "CUSTOM_INTERCEPT" - Profile type for TPPI. Type string `json:"type,omitempty"` // UpdateTime: Output only. Last resource update timestamp. UpdateTime string `json:"updateTime,omitempty"` @@ -3199,10 +3730,13 @@ func (s SecurityProfile) MarshalJSON() ([]byte, error) { } // SecurityProfileGroup: SecurityProfileGroup is a resource that defines the -// behavior for various ProfileTypes. Next ID: 11 +// behavior for various ProfileTypes. type SecurityProfileGroup struct { // CreateTime: Output only. Resource creation timestamp. CreateTime string `json:"createTime,omitempty"` + // CustomInterceptProfile: Optional. Reference to a SecurityProfile with the + // CustomIntercept configuration. + CustomInterceptProfile string `json:"customInterceptProfile,omitempty"` // CustomMirroringProfile: Optional. Reference to a SecurityProfile with the // CustomMirroring configuration. CustomMirroringProfile string `json:"customMirroringProfile,omitempty"` @@ -5398,7 +5932,7 @@ type OrganizationsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -11524,23 +12058,2444 @@ type ProjectsLocationsFirewallEndpointAssociationsCreateCall struct { header_ http.Header } -// Create: Creates a new FirewallEndpointAssociation in a given project and -// location. +// Create: Creates a new FirewallEndpointAssociation in a given project and +// location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) Create(parent string, firewallendpointassociation *FirewallEndpointAssociation) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c := &ProjectsLocationsFirewallEndpointAssociationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.firewallendpointassociation = firewallendpointassociation + return c +} + +// FirewallEndpointAssociationId sets the optional parameter +// "firewallEndpointAssociationId": Id of the requesting object. If +// auto-generating Id server-side, remove this field and +// firewall_endpoint_association_id from the method_signature of Create RPC. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) FirewallEndpointAssociationId(firewallEndpointAssociationId string) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c.urlParams_.Set("firewallEndpointAssociationId", firewallEndpointAssociationId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallendpointassociation) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/firewallEndpointAssociations") + 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 "networksecurity.projects.locations.firewallEndpointAssociations.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsFirewallEndpointAssociationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single FirewallEndpointAssociation. +// +// - name: Name of the resource. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) Delete(name string) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { + c := &ProjectsLocationsFirewallEndpointAssociationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "networksecurity.projects.locations.firewallEndpointAssociations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsFirewallEndpointAssociationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single FirewallEndpointAssociation. +// +// - name: Name of the resource. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) Get(name string) *ProjectsLocationsFirewallEndpointAssociationsGetCall { + c := &ProjectsLocationsFirewallEndpointAssociationsGetCall{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 +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFirewallEndpointAssociationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "networksecurity.projects.locations.firewallEndpointAssociations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *FirewallEndpointAssociation.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 *ProjectsLocationsFirewallEndpointAssociationsGetCall) Do(opts ...googleapi.CallOption) (*FirewallEndpointAssociation, 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 := &FirewallEndpointAssociation{ + 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 +} + +type ProjectsLocationsFirewallEndpointAssociationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Associations in a given project and location. +// +// - parent: Parent value for ListAssociationsRequest. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) List(parent string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c := &ProjectsLocationsFirewallEndpointAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Filter(filter string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) OrderBy(orderBy string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageSize(pageSize int64) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageToken(pageToken string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + 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 +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/firewallEndpointAssociations") + 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 "networksecurity.projects.locations.firewallEndpointAssociations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListFirewallEndpointAssociationsResponse.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 *ProjectsLocationsFirewallEndpointAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListFirewallEndpointAssociationsResponse, 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 := &ListFirewallEndpointAssociationsResponse{ + 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 +} + +// 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 *ProjectsLocationsFirewallEndpointAssociationsListCall) Pages(ctx context.Context, f func(*ListFirewallEndpointAssociationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsFirewallEndpointAssociationsPatchCall struct { + s *Service + name string + firewallendpointassociation *FirewallEndpointAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a single FirewallEndpointAssociation. +// +// - name: Immutable. Identifier. name of resource. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) Patch(name string, firewallendpointassociation *FirewallEndpointAssociation) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c := &ProjectsLocationsFirewallEndpointAssociationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.firewallendpointassociation = firewallendpointassociation + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the Association resource by +// the update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallendpointassociation) + if err != nil { + return nil, err + } + 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("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsGatewaySecurityPoliciesCreateCall struct { + s *Service + parent string + gatewaysecuritypolicy *GatewaySecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new GatewaySecurityPolicy in a given project and location. +// +// - parent: The parent resource of the GatewaySecurityPolicy. Must be in the +// format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Create(parent string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c := &ProjectsLocationsGatewaySecurityPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.gatewaysecuritypolicy = gatewaysecuritypolicy + return c +} + +// GatewaySecurityPolicyId sets the optional parameter +// "gatewaySecurityPolicyId": Required. Short name of the GatewaySecurityPolicy +// resource to be created. This value should be 1-63 characters long, +// containing only letters, numbers, hyphens, and underscores, and should not +// start with a number. E.g. "gateway_security_policy1". +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) GatewaySecurityPolicyId(gatewaySecurityPolicyId string) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c.urlParams_.Set("gatewaySecurityPolicyId", gatewaySecurityPolicyId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gatewaySecurityPolicies") + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsGatewaySecurityPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single GatewaySecurityPolicy. +// +// - name: A name of the GatewaySecurityPolicy to delete. Must be in the format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { + c := &ProjectsLocationsGatewaySecurityPoliciesDeleteCall{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 +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsGatewaySecurityPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single GatewaySecurityPolicy. +// +// - name: A name of the GatewaySecurityPolicy to get. Must be in the format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c := &ProjectsLocationsGatewaySecurityPoliciesGetCall{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 +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GatewaySecurityPolicy.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 *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicy, 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 := &GatewaySecurityPolicy{ + 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 +} + +type ProjectsLocationsGatewaySecurityPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists GatewaySecurityPolicies in a given project and location. +// +// - parent: The project and location from which the GatewaySecurityPolicies +// should be listed, specified in the format +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c := &ProjectsLocationsGatewaySecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// GatewaySecurityPolicies to return per call. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned by the +// last 'ListGatewaySecurityPoliciesResponse' Indicates that this is a +// continuation of a prior 'ListGatewaySecurityPolicies' call, and that the +// system should return the next page of data. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesListCall { + 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 +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/gatewaySecurityPolicies") + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListGatewaySecurityPoliciesResponse.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 *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPoliciesResponse, 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 := &ListGatewaySecurityPoliciesResponse{ + 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 +} + +// 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 *ProjectsLocationsGatewaySecurityPoliciesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPoliciesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsGatewaySecurityPoliciesPatchCall struct { + s *Service + name string + gatewaysecuritypolicy *GatewaySecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single GatewaySecurityPolicy. +// +// - name: Name of the resource. Name is of the form +// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_se +// curity_policy} gateway_security_policy should match the pattern:(^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$). +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Patch(name string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c := &ProjectsLocationsGatewaySecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.gatewaysecuritypolicy = gatewaysecuritypolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the GatewaySecurityPolicy resource +// by the update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) + if err != nil { + return nil, err + } + 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("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall struct { + s *Service + parent string + gatewaysecuritypolicyrule *GatewaySecurityPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new GatewaySecurityPolicy in a given project and location. +// +// - parent: The parent where this rule will be created. Format : +// projects/{project}/location/{location}/gatewaySecurityPolicies/*. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Create(parent string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + return c +} + +// GatewaySecurityPolicyRuleId sets the optional parameter +// "gatewaySecurityPolicyRuleId": The ID to use for the rule, which will become +// the final component of the rule's resource name. This value should be 4-63 +// characters, and valid characters are /a-z-/. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) GatewaySecurityPolicyRuleId(gatewaySecurityPolicyRuleId string) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c.urlParams_.Set("gatewaySecurityPolicyRuleId", gatewaySecurityPolicyRuleId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rules") + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single GatewaySecurityPolicyRule. +// +// - name: A name of the GatewaySecurityPolicyRule to delete. Must be in the +// format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySe +// curityPolicy}/rules/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall{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 +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single GatewaySecurityPolicyRule. +// +// - name: The name of the GatewaySecurityPolicyRule to retrieve. Format: +// projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/*. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesGetCall{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 +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GatewaySecurityPolicyRule.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 *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicyRule, 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 := &GatewaySecurityPolicyRule{ + 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 +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists GatewaySecurityPolicyRules in a given project and location. +// +// - parent: The project, location and GatewaySecurityPolicy from which the +// GatewaySecurityPolicyRules should be listed, specified in the format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySe +// curityPolicy}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// GatewaySecurityPolicyRules to return per call. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned by the +// last 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a +// continuation of a prior 'ListGatewaySecurityPolicyRules' call, and that the +// system should return the next page of data. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + 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 +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/rules") + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListGatewaySecurityPolicyRulesResponse.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 *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPolicyRulesResponse, 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 := &ListGatewaySecurityPolicyRulesResponse{ + 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 +} + +// 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 *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPolicyRulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall struct { + s *Service + name string + gatewaysecuritypolicyrule *GatewaySecurityPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single GatewaySecurityPolicyRule. +// +// - name: Immutable. Name of the resource. ame is the full resource name so +// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_se +// curity_policy}/rules/{rule} rule should match the pattern: (^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$). +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Patch(name string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the GatewaySecurityPolicy resource +// by the update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + if err != nil { + return nil, err + } + 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("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInterceptDeploymentGroupsCreateCall struct { + s *Service + parent string + interceptdeploymentgroup *InterceptDeploymentGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new InterceptDeploymentGroup in a given project and +// location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) Create(parent string, interceptdeploymentgroup *InterceptDeploymentGroup) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c := &ProjectsLocationsInterceptDeploymentGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.interceptdeploymentgroup = interceptdeploymentgroup + return c +} + +// InterceptDeploymentGroupId sets the optional parameter +// "interceptDeploymentGroupId": Required. Id of the requesting object If +// auto-generating Id server-side, remove this field and +// intercept_deployment_group_id from the method_signature of Create RPC +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) InterceptDeploymentGroupId(interceptDeploymentGroupId string) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c.urlParams_.Set("interceptDeploymentGroupId", interceptDeploymentGroupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptdeploymentgroup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptDeploymentGroups") + 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 "networksecurity.projects.locations.interceptDeploymentGroups.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInterceptDeploymentGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInterceptDeploymentGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single InterceptDeploymentGroup. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) Delete(name string) *ProjectsLocationsInterceptDeploymentGroupsDeleteCall { + c := &ProjectsLocationsInterceptDeploymentGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentGroupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "networksecurity.projects.locations.interceptDeploymentGroups.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInterceptDeploymentGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single InterceptDeploymentGroup. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) Get(name string) *ProjectsLocationsInterceptDeploymentGroupsGetCall { + c := &ProjectsLocationsInterceptDeploymentGroupsGetCall{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 +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptDeploymentGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "networksecurity.projects.locations.interceptDeploymentGroups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *InterceptDeploymentGroup.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 *ProjectsLocationsInterceptDeploymentGroupsGetCall) Do(opts ...googleapi.CallOption) (*InterceptDeploymentGroup, 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 := &InterceptDeploymentGroup{ + 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 +} + +type ProjectsLocationsInterceptDeploymentGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists InterceptDeploymentGroups in a given project and location. +// +// - parent: Parent value for ListInterceptDeploymentGroupsRequest. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) List(parent string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c := &ProjectsLocationsInterceptDeploymentGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Filter(filter string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) PageToken(pageToken string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + 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 +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/interceptDeploymentGroups") + 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 "networksecurity.projects.locations.interceptDeploymentGroups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListInterceptDeploymentGroupsResponse.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 *ProjectsLocationsInterceptDeploymentGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInterceptDeploymentGroupsResponse, 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 := &ListInterceptDeploymentGroupsResponse{ + 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 +} + +// 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 *ProjectsLocationsInterceptDeploymentGroupsListCall) Pages(ctx context.Context, f func(*ListInterceptDeploymentGroupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsInterceptDeploymentGroupsPatchCall struct { + s *Service + name string + interceptdeploymentgroup *InterceptDeploymentGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a single InterceptDeploymentGroup. +// +// - name: Immutable. Identifier. Then name of the InterceptDeploymentGroup. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) Patch(name string, interceptdeploymentgroup *InterceptDeploymentGroup) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c := &ProjectsLocationsInterceptDeploymentGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.interceptdeploymentgroup = interceptdeploymentgroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the InterceptDeploymentGroup +// resource by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if it is +// in the mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptdeploymentgroup) + if err != nil { + return nil, err + } + 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("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.interceptDeploymentGroups.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInterceptDeploymentGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInterceptDeploymentsCreateCall struct { + s *Service + parent string + interceptdeployment *InterceptDeployment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new InterceptDeployment in a given project and location. // // - parent: Value for parent. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) Create(parent string, firewallendpointassociation *FirewallEndpointAssociation) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { - c := &ProjectsLocationsFirewallEndpointAssociationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInterceptDeploymentsService) Create(parent string, interceptdeployment *InterceptDeployment) *ProjectsLocationsInterceptDeploymentsCreateCall { + c := &ProjectsLocationsInterceptDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.firewallendpointassociation = firewallendpointassociation + c.interceptdeployment = interceptdeployment return c } -// FirewallEndpointAssociationId sets the optional parameter -// "firewallEndpointAssociationId": Id of the requesting object. If -// auto-generating Id server-side, remove this field and -// firewall_endpoint_association_id from the method_signature of Create RPC. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) FirewallEndpointAssociationId(firewallEndpointAssociationId string) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { - c.urlParams_.Set("firewallEndpointAssociationId", firewallEndpointAssociationId) +// InterceptDeploymentId sets the optional parameter "interceptDeploymentId": +// Required. Id of the requesting object If auto-generating Id server-side, +// remove this field and intercept_deployment_id from the method_signature of +// Create RPC +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) InterceptDeploymentId(interceptDeploymentId string) *ProjectsLocationsInterceptDeploymentsCreateCall { + c.urlParams_.Set("interceptDeploymentId", interceptDeploymentId) return c } @@ -11555,7 +14510,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) FirewallEndpoi // This prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentsCreateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -11563,36 +14518,36 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) RequestId(requ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallendpointassociation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptdeployment) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/firewallEndpointAssociations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptDeployments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11605,12 +14560,12 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.create" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.create" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11642,7 +14597,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsFirewallEndpointAssociationsDeleteCall struct { +type ProjectsLocationsInterceptDeploymentsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11650,11 +14605,11 @@ type ProjectsLocationsFirewallEndpointAssociationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single FirewallEndpointAssociation. +// Delete: Deletes a single InterceptDeployment. // // - name: Name of the resource. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) Delete(name string) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { - c := &ProjectsLocationsFirewallEndpointAssociationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInterceptDeploymentsService) Delete(name string) *ProjectsLocationsInterceptDeploymentsDeleteCall { + c := &ProjectsLocationsInterceptDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11670,7 +14625,7 @@ func (r *ProjectsLocationsFirewallEndpointAssociationsService) Delete(name strin // This prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -11678,27 +14633,27 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) RequestId(requ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -11716,12 +14671,12 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.delete" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11753,7 +14708,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsFirewallEndpointAssociationsGetCall struct { +type ProjectsLocationsInterceptDeploymentsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11762,11 +14717,11 @@ type ProjectsLocationsFirewallEndpointAssociationsGetCall struct { header_ http.Header } -// Get: Gets details of a single FirewallEndpointAssociation. +// Get: Gets details of a single InterceptDeployment. // // - name: Name of the resource. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) Get(name string) *ProjectsLocationsFirewallEndpointAssociationsGetCall { - c := &ProjectsLocationsFirewallEndpointAssociationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInterceptDeploymentsService) Get(name string) *ProjectsLocationsInterceptDeploymentsGetCall { + c := &ProjectsLocationsInterceptDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11774,7 +14729,7 @@ func (r *ProjectsLocationsFirewallEndpointAssociationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsGetCall { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11782,27 +14737,27 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Fields(s ...googl // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFirewallEndpointAssociationsGetCall { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptDeploymentsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsGetCall { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -11823,13 +14778,13 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.get" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.get" call. // Any non-2xx status code is an error. Response headers are in either -// *FirewallEndpointAssociation.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 *ProjectsLocationsFirewallEndpointAssociationsGetCall) Do(opts ...googleapi.CallOption) (*FirewallEndpointAssociation, error) { +// *InterceptDeployment.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 *ProjectsLocationsInterceptDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*InterceptDeployment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11848,7 +14803,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallEndpointAssociation{ + ret := &InterceptDeployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11861,7 +14816,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsFirewallEndpointAssociationsListCall struct { +type ProjectsLocationsInterceptDeploymentsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -11870,24 +14825,24 @@ type ProjectsLocationsFirewallEndpointAssociationsListCall struct { header_ http.Header } -// List: Lists Associations in a given project and location. +// List: Lists InterceptDeployments in a given project and location. // -// - parent: Parent value for ListAssociationsRequest. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) List(parent string) *ProjectsLocationsFirewallEndpointAssociationsListCall { - c := &ProjectsLocationsFirewallEndpointAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListInterceptDeploymentsRequest. +func (r *ProjectsLocationsInterceptDeploymentsService) List(parent string) *ProjectsLocationsInterceptDeploymentsListCall { + c := &ProjectsLocationsInterceptDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Filter(filter string) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Filter(filter string) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Hint for how to order the // results -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) OrderBy(orderBy string) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) OrderBy(orderBy string) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -11895,14 +14850,14 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) OrderBy(orderBy // PageSize sets the optional parameter "pageSize": Requested page size. Server // may return fewer items than requested. If unspecified, server will pick an // appropriate default. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageSize(pageSize int64) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A token identifying a // page of results the server should return. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageToken(pageToken string) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -11910,7 +14865,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11918,27 +14873,27 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Fields(s ...goog // IfNoneMatch sets an 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. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptDeploymentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -11946,7 +14901,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/firewallEndpointAssociations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptDeployments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11959,13 +14914,13 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.list" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListFirewallEndpointAssociationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *ListInterceptDeploymentsResponse.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 *ProjectsLocationsFirewallEndpointAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListFirewallEndpointAssociationsResponse, error) { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListInterceptDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11984,7 +14939,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListFirewallEndpointAssociationsResponse{ + ret := &ListInterceptDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12000,7 +14955,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Do(opts ...googl // 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 *ProjectsLocationsFirewallEndpointAssociationsListCall) Pages(ctx context.Context, f func(*ListFirewallEndpointAssociationsResponse) error) error { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Pages(ctx context.Context, f func(*ListInterceptDeploymentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -12018,22 +14973,22 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Pages(ctx contex } } -type ProjectsLocationsFirewallEndpointAssociationsPatchCall struct { - s *Service - name string - firewallendpointassociation *FirewallEndpointAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptDeploymentsPatchCall struct { + s *Service + name string + interceptdeployment *InterceptDeployment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Update a single FirewallEndpointAssociation. +// Patch: Updates a single InterceptDeployment. // -// - name: Immutable. Identifier. name of resource. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) Patch(name string, firewallendpointassociation *FirewallEndpointAssociation) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { - c := &ProjectsLocationsFirewallEndpointAssociationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Identifier. The name of the InterceptDeployment. +func (r *ProjectsLocationsInterceptDeploymentsService) Patch(name string, interceptdeployment *InterceptDeployment) *ProjectsLocationsInterceptDeploymentsPatchCall { + c := &ProjectsLocationsInterceptDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.firewallendpointassociation = firewallendpointassociation + c.interceptdeployment = interceptdeployment return c } @@ -12048,18 +15003,18 @@ func (r *ProjectsLocationsFirewallEndpointAssociationsService) Patch(name string // This prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentsPatchCall { c.urlParams_.Set("requestId", requestId) return c } // UpdateMask sets the optional parameter "updateMask": Required. Field mask is -// used to specify the fields to be overwritten in the Association resource by -// the update. The fields specified in the update_mask are relative to the -// resource, not the full request. A field will be overwritten if it is in the -// mask. If the user does not provide a mask then all fields will be +// used to specify the fields to be overwritten in the InterceptDeployment +// resource by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if it is +// in the mask. If the user does not provide a mask then all fields will be // overwritten. -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInterceptDeploymentsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -12067,30 +15022,30 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) UpdateMask(upda // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallendpointassociation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptdeployment) if err != nil { return nil, err } @@ -12109,12 +15064,12 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.patch" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12146,69 +15101,85 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesCreateCall struct { - s *Service - parent string - gatewaysecuritypolicy *GatewaySecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall struct { + s *Service + parent string + interceptendpointgroupassociation *InterceptEndpointGroupAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new GatewaySecurityPolicy in a given project and location. +// Create: Creates a new InterceptEndpointGroupAssociation in a given project +// and location. // -// - parent: The parent resource of the GatewaySecurityPolicy. Must be in the -// format `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsGatewaySecurityPoliciesService) Create(parent string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { - c := &ProjectsLocationsGatewaySecurityPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Value for parent. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) Create(parent string, interceptendpointgroupassociation *InterceptEndpointGroupAssociation) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.gatewaysecuritypolicy = gatewaysecuritypolicy + c.interceptendpointgroupassociation = interceptendpointgroupassociation return c } -// GatewaySecurityPolicyId sets the optional parameter -// "gatewaySecurityPolicyId": Required. Short name of the GatewaySecurityPolicy -// resource to be created. This value should be 1-63 characters long, -// containing only letters, numbers, hyphens, and underscores, and should not -// start with a number. E.g. "gateway_security_policy1". -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) GatewaySecurityPolicyId(gatewaySecurityPolicyId string) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { - c.urlParams_.Set("gatewaySecurityPolicyId", gatewaySecurityPolicyId) +// InterceptEndpointGroupAssociationId sets the optional parameter +// "interceptEndpointGroupAssociationId": Id of the requesting object If +// auto-generating Id server-side, remove this field and +// intercept_endpoint_group_association_id from the method_signature of Create +// RPC +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) InterceptEndpointGroupAssociationId(interceptEndpointGroupAssociationId string) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { + c.urlParams_.Set("interceptEndpointGroupAssociationId", interceptEndpointGroupAssociationId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptendpointgroupassociation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gatewaySecurityPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptEndpointGroupAssociations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12221,12 +15192,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.create" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.create" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12258,7 +15229,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesDeleteCall struct { +type ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12266,40 +15237,55 @@ type ProjectsLocationsGatewaySecurityPoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single GatewaySecurityPolicy. +// Delete: Deletes a single InterceptEndpointGroupAssociation. // -// - name: A name of the GatewaySecurityPolicy to delete. Must be in the format -// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. -func (r *ProjectsLocationsGatewaySecurityPoliciesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { - c := &ProjectsLocationsGatewaySecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) Delete(name string) *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -12317,12 +15303,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.delete" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12354,7 +15340,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesGetCall struct { +type ProjectsLocationsInterceptEndpointGroupAssociationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12363,12 +15349,11 @@ type ProjectsLocationsGatewaySecurityPoliciesGetCall struct { header_ http.Header } -// Get: Gets details of a single GatewaySecurityPolicy. +// Get: Gets details of a single InterceptEndpointGroupAssociation. // -// - name: A name of the GatewaySecurityPolicy to get. Must be in the format -// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. -func (r *ProjectsLocationsGatewaySecurityPoliciesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { - c := &ProjectsLocationsGatewaySecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) Get(name string) *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12376,7 +15361,7 @@ func (r *ProjectsLocationsGatewaySecurityPoliciesService) Get(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12384,27 +15369,27 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12425,13 +15410,13 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.get" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GatewaySecurityPolicy.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 *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicy, error) { +// *InterceptEndpointGroupAssociation.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 *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) Do(opts ...googleapi.CallOption) (*InterceptEndpointGroupAssociation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12450,7 +15435,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GatewaySecurityPolicy{ + ret := &InterceptEndpointGroupAssociation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12463,7 +15448,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesListCall struct { +type ProjectsLocationsInterceptEndpointGroupAssociationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -12472,29 +15457,40 @@ type ProjectsLocationsGatewaySecurityPoliciesListCall struct { header_ http.Header } -// List: Lists GatewaySecurityPolicies in a given project and location. +// List: Lists InterceptEndpointGroupAssociations in a given project and +// location. // -// - parent: The project and location from which the GatewaySecurityPolicies -// should be listed, specified in the format -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsGatewaySecurityPoliciesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesListCall { - c := &ProjectsLocationsGatewaySecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListInterceptEndpointGroupAssociationsRequest. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) List(parent string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// GatewaySecurityPolicies to return per call. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesListCall { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Filter(filter string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) OrderBy(orderBy string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) PageSize(pageSize int64) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The value returned by the -// last 'ListGatewaySecurityPoliciesResponse' Indicates that this is a -// continuation of a prior 'ListGatewaySecurityPolicies' call, and that the -// system should return the next page of data. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesListCall { +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) PageToken(pageToken string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12502,7 +15498,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageToken(pageToken s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12510,27 +15506,27 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Fields(s ...googleapi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12538,7 +15534,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) 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/{+parent}/gatewaySecurityPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptEndpointGroupAssociations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12551,13 +15547,13 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.list" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListGatewaySecurityPoliciesResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *ListInterceptEndpointGroupAssociationsResponse.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 *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPoliciesResponse, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListInterceptEndpointGroupAssociationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12576,7 +15572,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListGatewaySecurityPoliciesResponse{ + ret := &ListInterceptEndpointGroupAssociationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12592,7 +15588,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsGatewaySecurityPoliciesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPoliciesResponse) error) error { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Pages(ctx context.Context, f func(*ListInterceptEndpointGroupAssociationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -12610,35 +15606,49 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Pages(ctx context.Con } } -type ProjectsLocationsGatewaySecurityPoliciesPatchCall struct { - s *Service - name string - gatewaysecuritypolicy *GatewaySecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall struct { + s *Service + name string + interceptendpointgroupassociation *InterceptEndpointGroupAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single GatewaySecurityPolicy. +// Patch: Updates a single InterceptEndpointGroupAssociation. // -// - name: Name of the resource. Name is of the form -// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_se -// curity_policy} gateway_security_policy should match the pattern:(^a-z -// ([a-z0-9-]{0,61}[a-z0-9])?$). -func (r *ProjectsLocationsGatewaySecurityPoliciesService) Patch(name string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { - c := &ProjectsLocationsGatewaySecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Identifier. The name of the +// InterceptEndpointGroupAssociation. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) Patch(name string, interceptendpointgroupassociation *InterceptEndpointGroupAssociation) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.gatewaysecuritypolicy = gatewaysecuritypolicy + c.interceptendpointgroupassociation = interceptendpointgroupassociation return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the GatewaySecurityPolicy resource -// by the update. The fields specified in the update_mask are relative to the -// resource, not the full request. A field will be overwritten if it is in the -// mask. If the user does not provide a mask then all fields will be -// overwritten. -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the +// InterceptEndpointGroupAssociation resource by the update. The fields +// specified in the update_mask are relative to the resource, not the full +// request. A field will be overwritten if it is in the mask. If the user does +// not provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -12646,30 +15656,30 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) UpdateMask(updateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptendpointgroupassociation) if err != nil { return nil, err } @@ -12688,12 +15698,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.patch" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12725,68 +15735,84 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall struct { - s *Service - parent string - gatewaysecuritypolicyrule *GatewaySecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptEndpointGroupsCreateCall struct { + s *Service + parent string + interceptendpointgroup *InterceptEndpointGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new GatewaySecurityPolicy in a given project and location. +// Create: Creates a new InterceptEndpointGroup in a given project and +// location. // -// - parent: The parent where this rule will be created. Format : -// projects/{project}/location/{location}/gatewaySecurityPolicies/*. -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Create(parent string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Value for parent. +func (r *ProjectsLocationsInterceptEndpointGroupsService) Create(parent string, interceptendpointgroup *InterceptEndpointGroup) *ProjectsLocationsInterceptEndpointGroupsCreateCall { + c := &ProjectsLocationsInterceptEndpointGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + c.interceptendpointgroup = interceptendpointgroup return c } -// GatewaySecurityPolicyRuleId sets the optional parameter -// "gatewaySecurityPolicyRuleId": The ID to use for the rule, which will become -// the final component of the rule's resource name. This value should be 4-63 -// characters, and valid characters are /a-z-/. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) GatewaySecurityPolicyRuleId(gatewaySecurityPolicyRuleId string) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { - c.urlParams_.Set("gatewaySecurityPolicyRuleId", gatewaySecurityPolicyRuleId) +// InterceptEndpointGroupId sets the optional parameter +// "interceptEndpointGroupId": Required. Id of the requesting object If +// auto-generating Id server-side, remove this field and +// intercept_endpoint_group_id from the method_signature of Create RPC +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) InterceptEndpointGroupId(interceptEndpointGroupId string) *ProjectsLocationsInterceptEndpointGroupsCreateCall { + c.urlParams_.Set("interceptEndpointGroupId", interceptEndpointGroupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptendpointgroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptEndpointGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12799,12 +15825,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.create" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12836,7 +15862,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall struct { +type ProjectsLocationsInterceptEndpointGroupsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12844,42 +15870,55 @@ type ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single GatewaySecurityPolicyRule. +// Delete: Deletes a single InterceptEndpointGroup. // -// - name: A name of the GatewaySecurityPolicyRule to delete. Must be in the -// format -// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySe -// curityPolicy}/rules/*`. -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptEndpointGroupsService) Delete(name string) *ProjectsLocationsInterceptEndpointGroupsDeleteCall { + c := &ProjectsLocationsInterceptEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -12897,12 +15936,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12934,7 +15973,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesRulesGetCall struct { +type ProjectsLocationsInterceptEndpointGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12943,12 +15982,11 @@ type ProjectsLocationsGatewaySecurityPoliciesRulesGetCall struct { header_ http.Header } -// Get: Gets details of a single GatewaySecurityPolicyRule. +// Get: Gets details of a single InterceptEndpointGroup. // -// - name: The name of the GatewaySecurityPolicyRule to retrieve. Format: -// projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/*. -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptEndpointGroupsService) Get(name string) *ProjectsLocationsInterceptEndpointGroupsGetCall { + c := &ProjectsLocationsInterceptEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12956,7 +15994,7 @@ func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12964,27 +16002,27 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Fields(s ...googl // IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptEndpointGroupsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13005,13 +16043,13 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GatewaySecurityPolicyRule.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 *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicyRule, error) { +// *InterceptEndpointGroup.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 *ProjectsLocationsInterceptEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*InterceptEndpointGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13030,7 +16068,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GatewaySecurityPolicyRule{ + ret := &InterceptEndpointGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13043,7 +16081,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesRulesListCall struct { +type ProjectsLocationsInterceptEndpointGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -13052,30 +16090,39 @@ type ProjectsLocationsGatewaySecurityPoliciesRulesListCall struct { header_ http.Header } -// List: Lists GatewaySecurityPolicyRules in a given project and location. +// List: Lists InterceptEndpointGroups in a given project and location. // -// - parent: The project, location and GatewaySecurityPolicy from which the -// GatewaySecurityPolicyRules should be listed, specified in the format -// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySe -// curityPolicy}`. -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListInterceptEndpointGroupsRequest. +func (r *ProjectsLocationsInterceptEndpointGroupsService) List(parent string) *ProjectsLocationsInterceptEndpointGroupsListCall { + c := &ProjectsLocationsInterceptEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// GatewaySecurityPolicyRules to return per call. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Filter(filter string) *ProjectsLocationsInterceptEndpointGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsInterceptEndpointGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsInterceptEndpointGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The value returned by the -// last 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a -// continuation of a prior 'ListGatewaySecurityPolicyRules' call, and that the -// system should return the next page of data. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) PageToken(pageToken string) *ProjectsLocationsInterceptEndpointGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -13083,7 +16130,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13091,27 +16138,27 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Fields(s ...goog // IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptEndpointGroupsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13119,7 +16166,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptEndpointGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13132,13 +16179,13 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListGatewaySecurityPolicyRulesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *ListInterceptEndpointGroupsResponse.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 *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPolicyRulesResponse, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInterceptEndpointGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13157,7 +16204,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListGatewaySecurityPolicyRulesResponse{ + ret := &ListInterceptEndpointGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13173,7 +16220,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Do(opts ...googl // 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 *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPolicyRulesResponse) error) error { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Pages(ctx context.Context, f func(*ListInterceptEndpointGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -13191,35 +16238,48 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Pages(ctx contex } } -type ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall struct { - s *Service - name string - gatewaysecuritypolicyrule *GatewaySecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptEndpointGroupsPatchCall struct { + s *Service + name string + interceptendpointgroup *InterceptEndpointGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single GatewaySecurityPolicyRule. +// Patch: Updates a single InterceptEndpointGroup. // -// - name: Immutable. Name of the resource. ame is the full resource name so -// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_se -// curity_policy}/rules/{rule} rule should match the pattern: (^a-z -// ([a-z0-9-]{0,61}[a-z0-9])?$). -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Patch(name string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Identifier. The name of the InterceptEndpointGroup. +func (r *ProjectsLocationsInterceptEndpointGroupsService) Patch(name string, interceptendpointgroup *InterceptEndpointGroup) *ProjectsLocationsInterceptEndpointGroupsPatchCall { + c := &ProjectsLocationsInterceptEndpointGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + c.interceptendpointgroup = interceptendpointgroup return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the GatewaySecurityPolicy resource -// by the update. The fields specified in the update_mask are relative to the -// resource, not the full request. A field will be overwritten if it is in the -// mask. If the user does not provide a mask then all fields will be +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the InterceptEndpointGroup +// resource by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if it is +// in the mask. If the user does not provide a mask then all fields will be // overwritten. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInterceptEndpointGroupsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -13227,30 +16287,30 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) UpdateMask(upda // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptendpointgroup) if err != nil { return nil, err } @@ -13269,12 +16329,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.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 *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15849,7 +18909,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index 362c7c267d5..4ae77063e8d 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -1918,7 +1918,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networkservices.projects.locations.operations.cancel", @@ -2934,7 +2934,7 @@ } } }, - "revision": "20241109", + "revision": "20241118", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -4909,7 +4909,7 @@ "type": "object" }, "LoggingConfig": { - "description": "The configuration for Platform Telemetry logging for Eventarc Avdvanced resources.", + "description": "The configuration for Platform Telemetry logging for Eventarc Advanced resources.", "id": "LoggingConfig", "properties": { "logSeverity": { diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index ade2fd4ab2c..baa8da225db 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -3159,7 +3159,7 @@ func (s Location) MarshalJSON() ([]byte, error) { } // LoggingConfig: The configuration for Platform Telemetry logging for Eventarc -// Avdvanced resources. +// Advanced resources. type LoggingConfig struct { // LogSeverity: Optional. The minimum severity of logs that will be sent to // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be @@ -11003,7 +11003,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/orgpolicy/v2/orgpolicy-api.json b/orgpolicy/v2/orgpolicy-api.json index d529ce4df38..589882cb0f7 100644 --- a/orgpolicy/v2/orgpolicy-api.json +++ b/orgpolicy/v2/orgpolicy-api.json @@ -930,7 +930,7 @@ } } }, - "revision": "20241021", + "revision": "20241129", "rootUrl": "https://orgpolicy.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -989,6 +989,10 @@ "supportsDryRun": { "description": "Shows if dry run is supported for this constraint or not.", "type": "boolean" + }, + "supportsSimulation": { + "description": "Shows if simulation is supported for this constraint or not.", + "type": "boolean" } }, "type": "object" @@ -1350,6 +1354,14 @@ "description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", "type": "boolean" }, + "parameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Required for GMCs if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }", + "type": "object" + }, "values": { "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", "description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." diff --git a/orgpolicy/v2/orgpolicy-gen.go b/orgpolicy/v2/orgpolicy-gen.go index 2afecd91d38..aab16aea919 100644 --- a/orgpolicy/v2/orgpolicy-gen.go +++ b/orgpolicy/v2/orgpolicy-gen.go @@ -340,6 +340,9 @@ type GoogleCloudOrgpolicyV2Constraint struct { Name string `json:"name,omitempty"` // SupportsDryRun: Shows if dry run is supported for this constraint or not. SupportsDryRun bool `json:"supportsDryRun,omitempty"` + // SupportsSimulation: Shows if simulation is supported for this constraint or + // not. + SupportsSimulation bool `json:"supportsSimulation,omitempty"` // ForceSendFields is a list of field names (e.g. "BooleanConstraint") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -827,6 +830,12 @@ type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct { // configuration is acceptable. This field can be set only in policies for // boolean constraints. Enforce bool `json:"enforce,omitempty"` + // Parameters: Optional. Required for GMCs if parameters defined in + // constraints. Pass parameter values when policy enforcement is enabled. + // Ensure that parameter value types match those defined in the constraint + // definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], + // "allowAll" : true } + Parameters googleapi.RawMessage `json:"parameters,omitempty"` // Values: List of values to be used for this policy rule. This field can be // set only in policies for list constraints. Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"` diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 2945eef09a5..c76aeb9494d 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -370,7 +370,7 @@ "clusters": { "methods": { "backup": { - "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation.", + "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:backup", "httpMethod": "POST", "id": "redis.projects.locations.clusters.backup", @@ -1067,7 +1067,7 @@ } } }, - "revision": "20241114", + "revision": "20241203", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1116,7 +1116,7 @@ "description": "Optional. Trigger automated backups at a fixed frequency." }, "retention": { - "description": "Optional. How long to keep automated backups before the backups are deleted. If not specified, the default value is 100 years which is also the maximum value supported. The minimum value is 1 day.", + "description": "Optional. How long to keep automated backups before the backups are deleted. The value should be between 1 day and 365 days. If not specified, the default value is 35 days.", "format": "google-duration", "type": "string" } @@ -1257,13 +1257,15 @@ "STATE_UNSPECIFIED", "CREATING", "ACTIVE", - "DELETING" + "DELETING", + "SUSPENDED" ], "enumDescriptions": [ "The default value, not set.", "The backup is being created.", "The backup is active to be used.", - "The backup is being deleted." + "The backup is being deleted.", + "The backup is currently suspended due to reasons like project deletion, billing account closure, etc." ], "readOnly": true, "type": "string" @@ -1273,6 +1275,11 @@ "format": "int64", "readOnly": true, "type": "string" + }, + "uid": { + "description": "Output only. System assigned unique identifier of the backup.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1310,6 +1317,11 @@ "name": { "description": "Identifier. Full resource path of the backup collection.", "type": "string" + }, + "uid": { + "description": "Output only. System assigned unique identifier of the backup collection.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1764,6 +1776,10 @@ "description": "Detailed information of each PSC connection.", "id": "ConnectionDetail", "properties": { + "pscAutoConnection": { + "$ref": "PscAutoConnection", + "description": "Detailed information of a PSC connection that is created through service connectivity automation." + }, "pscConnection": { "$ref": "PscConnection", "description": "Detailed information of a PSC connection that is created by the customer who owns the cluster." @@ -2879,7 +2895,7 @@ "properties": { "startTime": { "$ref": "TimeOfDay", - "description": "Optional. The start time of every automated backup in UTC. It must be set to the start of an hour. If not specified, the default value is the start of the hour when the automated backup config is enabled. For example, if the automated backup config is enabled at 10:13 AM UTC without specifying start_time, the default start time is 10:00 AM UTC." + "description": "Required. The start time of every automated backup in UTC. It must be set to the start of an hour. This field is required." } }, "type": "object" @@ -3964,6 +3980,73 @@ }, "type": "object" }, + "PscAutoConnection": { + "description": "Details of consumer resources in a PSC connection that is created through Service Connectivity Automation.", + "id": "PscAutoConnection", + "properties": { + "address": { + "description": "Output only. The IP allocated on the consumer network for the PSC forwarding rule.", + "readOnly": true, + "type": "string" + }, + "connectionType": { + "description": "Output only. Type of the PSC connection.", + "enum": [ + "CONNECTION_TYPE_UNSPECIFIED", + "CONNECTION_TYPE_DISCOVERY", + "CONNECTION_TYPE_PRIMARY", + "CONNECTION_TYPE_READER" + ], + "enumDescriptions": [ + "Cluster endpoint Type is not set", + "Cluster endpoint that will be used as for cluster topology discovery.", + "Cluster endpoint that will be used as primary endpoint to access primary.", + "Cluster endpoint that will be used as reader endpoint to access replicas." + ], + "readOnly": true, + "type": "string" + }, + "forwardingRule": { + "description": "Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.", + "readOnly": true, + "type": "string" + }, + "network": { + "description": "Required. The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.", + "type": "string" + }, + "projectId": { + "description": "Required. The consumer project_id where the forwarding rule is created from.", + "type": "string" + }, + "pscConnectionId": { + "description": "Output only. The PSC connection id of the forwarding rule connected to the service attachment.", + "readOnly": true, + "type": "string" + }, + "pscConnectionStatus": { + "description": "Output only. The status of the PSC connection. Please note that this value is updated periodically. Please use Private Service Connect APIs for the latest status.", + "enum": [ + "PSC_CONNECTION_STATUS_UNSPECIFIED", + "PSC_CONNECTION_STATUS_ACTIVE", + "PSC_CONNECTION_STATUS_NOT_FOUND" + ], + "enumDescriptions": [ + "PSC connection status is not specified.", + "The connection is active", + "Connection not found" + ], + "readOnly": true, + "type": "string" + }, + "serviceAttachment": { + "description": "Output only. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "PscConfig": { "id": "PscConfig", "properties": { diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 6331a268c54..3231a9e22d4 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -283,8 +283,8 @@ type AutomatedBackupConfig struct { // frequency. FixedFrequencySchedule *FixedFrequencySchedule `json:"fixedFrequencySchedule,omitempty"` // Retention: Optional. How long to keep automated backups before the backups - // are deleted. If not specified, the default value is 100 years which is also - // the maximum value supported. The minimum value is 1 day. + // are deleted. The value should be between 1 day and 365 days. If not + // specified, the default value is 35 days. Retention string `json:"retention,omitempty"` // ForceSendFields is a list of field names (e.g. "AutomatedBackupMode") to // unconditionally include in API requests. By default, fields with empty or @@ -394,9 +394,13 @@ type Backup struct { // "CREATING" - The backup is being created. // "ACTIVE" - The backup is active to be used. // "DELETING" - The backup is being deleted. + // "SUSPENDED" - The backup is currently suspended due to reasons like + // project deletion, billing account closure, etc. State string `json:"state,omitempty"` // TotalSizeBytes: Output only. Total size of the backup in bytes. TotalSizeBytes int64 `json:"totalSizeBytes,omitempty,string"` + // Uid: Output only. System assigned unique identifier of the backup. + Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -454,6 +458,9 @@ type BackupCollection struct { ClusterUid string `json:"clusterUid,omitempty"` // Name: Identifier. Full resource path of the backup collection. Name string `json:"name,omitempty"` + // Uid: Output only. System assigned unique identifier of the backup + // collection. + Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -938,18 +945,21 @@ func (s Compliance) MarshalJSON() ([]byte, error) { // ConnectionDetail: Detailed information of each PSC connection. type ConnectionDetail struct { + // PscAutoConnection: Detailed information of a PSC connection that is created + // through service connectivity automation. + PscAutoConnection *PscAutoConnection `json:"pscAutoConnection,omitempty"` // PscConnection: Detailed information of a PSC connection that is created by // the customer who owns the cluster. PscConnection *PscConnection `json:"pscConnection,omitempty"` - // ForceSendFields is a list of field names (e.g. "PscConnection") to + // ForceSendFields is a list of field names (e.g. "PscAutoConnection") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PscConnection") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PscAutoConnection") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1953,11 +1963,8 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { // FixedFrequencySchedule: This schedule allows the backup to be triggered at a // fixed frequency (currently only daily is supported). type FixedFrequencySchedule struct { - // StartTime: Optional. The start time of every automated backup in UTC. It - // must be set to the start of an hour. If not specified, the default value is - // the start of the hour when the automated backup config is enabled. For - // example, if the automated backup config is enabled at 10:13 AM UTC without - // specifying start_time, the default start time is 10:00 AM UTC. + // StartTime: Required. The start time of every automated backup in UTC. It + // must be set to the start of an hour. This field is required. StartTime *TimeOfDay `json:"startTime,omitempty"` // ForceSendFields is a list of field names (e.g. "StartTime") to // unconditionally include in API requests. By default, fields with empty or @@ -3192,6 +3199,69 @@ func (s Product) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PscAutoConnection: Details of consumer resources in a PSC connection that is +// created through Service Connectivity Automation. +type PscAutoConnection struct { + // Address: Output only. The IP allocated on the consumer network for the PSC + // forwarding rule. + Address string `json:"address,omitempty"` + // ConnectionType: Output only. Type of the PSC connection. + // + // Possible values: + // "CONNECTION_TYPE_UNSPECIFIED" - Cluster endpoint Type is not set + // "CONNECTION_TYPE_DISCOVERY" - Cluster endpoint that will be used as for + // cluster topology discovery. + // "CONNECTION_TYPE_PRIMARY" - Cluster endpoint that will be used as primary + // endpoint to access primary. + // "CONNECTION_TYPE_READER" - Cluster endpoint that will be used as reader + // endpoint to access replicas. + ConnectionType string `json:"connectionType,omitempty"` + // ForwardingRule: Output only. The URI of the consumer side forwarding rule. + // Example: + // projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + ForwardingRule string `json:"forwardingRule,omitempty"` + // Network: Required. The consumer network where the IP address resides, in the + // form of projects/{project_id}/global/networks/{network_id}. + Network string `json:"network,omitempty"` + // ProjectId: Required. The consumer project_id where the forwarding rule is + // created from. + ProjectId string `json:"projectId,omitempty"` + // PscConnectionId: Output only. The PSC connection id of the forwarding rule + // connected to the service attachment. + PscConnectionId string `json:"pscConnectionId,omitempty"` + // PscConnectionStatus: Output only. The status of the PSC connection. Please + // note that this value is updated periodically. Please use Private Service + // Connect APIs for the latest status. + // + // Possible values: + // "PSC_CONNECTION_STATUS_UNSPECIFIED" - PSC connection status is not + // specified. + // "PSC_CONNECTION_STATUS_ACTIVE" - The connection is active + // "PSC_CONNECTION_STATUS_NOT_FOUND" - Connection not found + PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` + // ServiceAttachment: Output only. The service attachment which is the target + // of the PSC connection, in the form of + // projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment + // -id}. + ServiceAttachment string `json:"serviceAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "Address") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Address") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PscAutoConnection) MarshalJSON() ([]byte, error) { + type NoMethod PscAutoConnection + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type PscConfig struct { // Network: Required. The network where the IP address of the discovery // endpoint will be reserved, in the form of @@ -4852,7 +4922,12 @@ type ProjectsLocationsClustersBackupCall struct { // belongs to this collection. Both collection and backup will have a resource // name. Backup will be executed for each shard. A replica (primary if nonHA) // will be selected to perform the execution. Backup call will be rejected if -// there is an ongoing backup or update operation. +// there is an ongoing backup or update operation. Be aware that during +// preview, if the cluster's internal software version is too old, critical +// update will be performed before actual backup. Once the internal software +// version is updated to the minimum version required by the backup feature, +// subsequent backups will not require critical update. After preview, there +// will be no critical update needed for backup. // // - name: Redis cluster resource name using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index 91592012e40..bfe575d3b69 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -370,7 +370,7 @@ "clusters": { "methods": { "backup": { - "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation.", + "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:backup", "httpMethod": "POST", "id": "redis.projects.locations.clusters.backup", @@ -1067,7 +1067,7 @@ } } }, - "revision": "20241114", + "revision": "20241203", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1116,7 +1116,7 @@ "description": "Optional. Trigger automated backups at a fixed frequency." }, "retention": { - "description": "Optional. How long to keep automated backups before the backups are deleted. If not specified, the default value is 100 years which is also the maximum value supported. The minimum value is 1 day.", + "description": "Optional. How long to keep automated backups before the backups are deleted. The value should be between 1 day and 365 days. If not specified, the default value is 35 days.", "format": "google-duration", "type": "string" } @@ -1257,13 +1257,15 @@ "STATE_UNSPECIFIED", "CREATING", "ACTIVE", - "DELETING" + "DELETING", + "SUSPENDED" ], "enumDescriptions": [ "The default value, not set.", "The backup is being created.", "The backup is active to be used.", - "The backup is being deleted." + "The backup is being deleted.", + "The backup is currently suspended due to reasons like project deletion, billing account closure, etc." ], "readOnly": true, "type": "string" @@ -1273,6 +1275,11 @@ "format": "int64", "readOnly": true, "type": "string" + }, + "uid": { + "description": "Output only. System assigned unique identifier of the backup.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1310,6 +1317,11 @@ "name": { "description": "Identifier. Full resource path of the backup collection.", "type": "string" + }, + "uid": { + "description": "Output only. System assigned unique identifier of the backup collection.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1764,6 +1776,10 @@ "description": "Detailed information of each PSC connection.", "id": "ConnectionDetail", "properties": { + "pscAutoConnection": { + "$ref": "PscAutoConnection", + "description": "Detailed information of a PSC connection that is created through service connectivity automation." + }, "pscConnection": { "$ref": "PscConnection", "description": "Detailed information of a PSC connection that is created by the customer who owns the cluster." @@ -2879,7 +2895,7 @@ "properties": { "startTime": { "$ref": "TimeOfDay", - "description": "Optional. The start time of every automated backup in UTC. It must be set to the start of an hour. If not specified, the default value is the start of the hour when the automated backup config is enabled. For example, if the automated backup config is enabled at 10:13 AM UTC without specifying start_time, the default start time is 10:00 AM UTC." + "description": "Required. The start time of every automated backup in UTC. It must be set to the start of an hour. This field is required." } }, "type": "object" @@ -3971,6 +3987,73 @@ }, "type": "object" }, + "PscAutoConnection": { + "description": "Details of consumer resources in a PSC connection that is created through Service Connectivity Automation.", + "id": "PscAutoConnection", + "properties": { + "address": { + "description": "Output only. The IP allocated on the consumer network for the PSC forwarding rule.", + "readOnly": true, + "type": "string" + }, + "connectionType": { + "description": "Output only. Type of the PSC connection.", + "enum": [ + "CONNECTION_TYPE_UNSPECIFIED", + "CONNECTION_TYPE_DISCOVERY", + "CONNECTION_TYPE_PRIMARY", + "CONNECTION_TYPE_READER" + ], + "enumDescriptions": [ + "Cluster endpoint Type is not set", + "Cluster endpoint that will be used as for cluster topology discovery.", + "Cluster endpoint that will be used as primary endpoint to access primary.", + "Cluster endpoint that will be used as reader endpoint to access replicas." + ], + "readOnly": true, + "type": "string" + }, + "forwardingRule": { + "description": "Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.", + "readOnly": true, + "type": "string" + }, + "network": { + "description": "Required. The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.", + "type": "string" + }, + "projectId": { + "description": "Required. The consumer project_id where the forwarding rule is created from.", + "type": "string" + }, + "pscConnectionId": { + "description": "Output only. The PSC connection id of the forwarding rule connected to the service attachment.", + "readOnly": true, + "type": "string" + }, + "pscConnectionStatus": { + "description": "Output only. The status of the PSC connection. Please note that this value is updated periodically. Please use Private Service Connect APIs for the latest status.", + "enum": [ + "PSC_CONNECTION_STATUS_UNSPECIFIED", + "PSC_CONNECTION_STATUS_ACTIVE", + "PSC_CONNECTION_STATUS_NOT_FOUND" + ], + "enumDescriptions": [ + "PSC connection status is not specified.", + "The connection is active", + "Connection not found" + ], + "readOnly": true, + "type": "string" + }, + "serviceAttachment": { + "description": "Output only. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "PscConfig": { "id": "PscConfig", "properties": { diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index 456514d5eb7..634b6a4a890 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -283,8 +283,8 @@ type AutomatedBackupConfig struct { // frequency. FixedFrequencySchedule *FixedFrequencySchedule `json:"fixedFrequencySchedule,omitempty"` // Retention: Optional. How long to keep automated backups before the backups - // are deleted. If not specified, the default value is 100 years which is also - // the maximum value supported. The minimum value is 1 day. + // are deleted. The value should be between 1 day and 365 days. If not + // specified, the default value is 35 days. Retention string `json:"retention,omitempty"` // ForceSendFields is a list of field names (e.g. "AutomatedBackupMode") to // unconditionally include in API requests. By default, fields with empty or @@ -394,9 +394,13 @@ type Backup struct { // "CREATING" - The backup is being created. // "ACTIVE" - The backup is active to be used. // "DELETING" - The backup is being deleted. + // "SUSPENDED" - The backup is currently suspended due to reasons like + // project deletion, billing account closure, etc. State string `json:"state,omitempty"` // TotalSizeBytes: Output only. Total size of the backup in bytes. TotalSizeBytes int64 `json:"totalSizeBytes,omitempty,string"` + // Uid: Output only. System assigned unique identifier of the backup. + Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -454,6 +458,9 @@ type BackupCollection struct { ClusterUid string `json:"clusterUid,omitempty"` // Name: Identifier. Full resource path of the backup collection. Name string `json:"name,omitempty"` + // Uid: Output only. System assigned unique identifier of the backup + // collection. + Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -938,18 +945,21 @@ func (s Compliance) MarshalJSON() ([]byte, error) { // ConnectionDetail: Detailed information of each PSC connection. type ConnectionDetail struct { + // PscAutoConnection: Detailed information of a PSC connection that is created + // through service connectivity automation. + PscAutoConnection *PscAutoConnection `json:"pscAutoConnection,omitempty"` // PscConnection: Detailed information of a PSC connection that is created by // the customer who owns the cluster. PscConnection *PscConnection `json:"pscConnection,omitempty"` - // ForceSendFields is a list of field names (e.g. "PscConnection") to + // ForceSendFields is a list of field names (e.g. "PscAutoConnection") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PscConnection") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PscAutoConnection") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1953,11 +1963,8 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { // FixedFrequencySchedule: This schedule allows the backup to be triggered at a // fixed frequency (currently only daily is supported). type FixedFrequencySchedule struct { - // StartTime: Optional. The start time of every automated backup in UTC. It - // must be set to the start of an hour. If not specified, the default value is - // the start of the hour when the automated backup config is enabled. For - // example, if the automated backup config is enabled at 10:13 AM UTC without - // specifying start_time, the default start time is 10:00 AM UTC. + // StartTime: Required. The start time of every automated backup in UTC. It + // must be set to the start of an hour. This field is required. StartTime *TimeOfDay `json:"startTime,omitempty"` // ForceSendFields is a list of field names (e.g. "StartTime") to // unconditionally include in API requests. By default, fields with empty or @@ -3196,6 +3203,69 @@ func (s Product) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PscAutoConnection: Details of consumer resources in a PSC connection that is +// created through Service Connectivity Automation. +type PscAutoConnection struct { + // Address: Output only. The IP allocated on the consumer network for the PSC + // forwarding rule. + Address string `json:"address,omitempty"` + // ConnectionType: Output only. Type of the PSC connection. + // + // Possible values: + // "CONNECTION_TYPE_UNSPECIFIED" - Cluster endpoint Type is not set + // "CONNECTION_TYPE_DISCOVERY" - Cluster endpoint that will be used as for + // cluster topology discovery. + // "CONNECTION_TYPE_PRIMARY" - Cluster endpoint that will be used as primary + // endpoint to access primary. + // "CONNECTION_TYPE_READER" - Cluster endpoint that will be used as reader + // endpoint to access replicas. + ConnectionType string `json:"connectionType,omitempty"` + // ForwardingRule: Output only. The URI of the consumer side forwarding rule. + // Example: + // projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + ForwardingRule string `json:"forwardingRule,omitempty"` + // Network: Required. The consumer network where the IP address resides, in the + // form of projects/{project_id}/global/networks/{network_id}. + Network string `json:"network,omitempty"` + // ProjectId: Required. The consumer project_id where the forwarding rule is + // created from. + ProjectId string `json:"projectId,omitempty"` + // PscConnectionId: Output only. The PSC connection id of the forwarding rule + // connected to the service attachment. + PscConnectionId string `json:"pscConnectionId,omitempty"` + // PscConnectionStatus: Output only. The status of the PSC connection. Please + // note that this value is updated periodically. Please use Private Service + // Connect APIs for the latest status. + // + // Possible values: + // "PSC_CONNECTION_STATUS_UNSPECIFIED" - PSC connection status is not + // specified. + // "PSC_CONNECTION_STATUS_ACTIVE" - The connection is active + // "PSC_CONNECTION_STATUS_NOT_FOUND" - Connection not found + PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` + // ServiceAttachment: Output only. The service attachment which is the target + // of the PSC connection, in the form of + // projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment + // -id}. + ServiceAttachment string `json:"serviceAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "Address") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Address") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PscAutoConnection) MarshalJSON() ([]byte, error) { + type NoMethod PscAutoConnection + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type PscConfig struct { // Network: Required. The network where the IP address of the discovery // endpoint will be reserved, in the form of @@ -4856,7 +4926,12 @@ type ProjectsLocationsClustersBackupCall struct { // belongs to this collection. Both collection and backup will have a resource // name. Backup will be executed for each shard. A replica (primary if nonHA) // will be selected to perform the execution. Backup call will be rejected if -// there is an ongoing backup or update operation. +// there is an ongoing backup or update operation. Be aware that during +// preview, if the cluster's internal software version is too old, critical +// update will be performed before actual backup. Once the internal software +// version is updated to the minimum version required by the backup feature, +// subsequent backups will not require critical update. After preview, there +// will be no critical update needed for backup. // // - name: Redis cluster resource name using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` diff --git a/servicemanagement/v1/servicemanagement-api.json b/servicemanagement/v1/servicemanagement-api.json index ed2f82cd0ed..283d95e17d0 100644 --- a/servicemanagement/v1/servicemanagement-api.json +++ b/servicemanagement/v1/servicemanagement-api.json @@ -830,7 +830,7 @@ } } }, - "revision": "20241106", + "revision": "20241202", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -1568,6 +1568,10 @@ "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { + "additionalIamInfo": { + "description": "Optional information about the IAM configuration. This is typically used to link to documentation about a product's IAM roles and permissions.", + "type": "string" + }, "documentationRootUrl": { "description": "The URL to the root of documentation.", "type": "string" @@ -2039,6 +2043,13 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "renamedServices": { + "additionalProperties": { + "type": "string" + }, + "description": "Map of service names to renamed services. Keys are the package relative service names and values are the name to be used for the service client and call options. publishing: go_settings: renamed_services: Publisher: TopicAdmin", + "type": "object" } }, "type": "object" diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index 01afaef1962..760bb9a05f8 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -1409,6 +1409,10 @@ func (s Diagnostic) MarshalJSON() ([]byte, error) { // directive `suppress_warning` does not directly affect documentation and is // documented together with service config validation. type Documentation struct { + // AdditionalIamInfo: Optional information about the IAM configuration. This is + // typically used to link to documentation about a product's IAM roles and + // permissions. + AdditionalIamInfo string `json:"additionalIamInfo,omitempty"` // DocumentationRootUrl: The URL to the root of documentation. DocumentationRootUrl string `json:"documentationRootUrl,omitempty"` // Overview: Declares a single overview page. For example: documentation: @@ -1435,15 +1439,15 @@ type Documentation struct { // plain text. It becomes the overview of the service displayed in Google Cloud // Console. NOTE: This field is equivalent to the standard field `description`. Summary string `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. "DocumentationRootUrl") to + // ForceSendFields is a list of field names (e.g. "AdditionalIamInfo") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DocumentationRootUrl") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "AdditionalIamInfo") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1998,6 +2002,11 @@ func (s GetPolicyOptions) MarshalJSON() ([]byte, error) { type GoSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // RenamedServices: Map of service names to renamed services. Keys are the + // package relative service names and values are the name to be used for the + // service client and call options. publishing: go_settings: renamed_services: + // Publisher: TopicAdmin + RenamedServices map[string]string `json:"renamedServices,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/workstations/v1/workstations-api.json b/workstations/v1/workstations-api.json index a07b1ea9f33..17375eca087 100644 --- a/workstations/v1/workstations-api.json +++ b/workstations/v1/workstations-api.json @@ -180,7 +180,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "workstations.projects.locations.operations.cancel", @@ -873,7 +873,7 @@ ] }, "generateAccessToken": { - "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. Once generated this token cannot be revoked and is good for the lifetime of the token.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", "httpMethod": "POST", "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", @@ -1195,7 +1195,7 @@ } } }, - "revision": "20241009", + "revision": "20241202", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1285,7 +1285,7 @@ "type": "object" }, "BoostConfig": { - "description": "A configuration that workstations can boost to.", + "description": "A boost configuration is a set of resources that a workstation can use to increase its performance. If a boost configuration is specified, when starting a workstation, users can choose to use a VM provisioned under the boost config by passing the boost config id in the start request. If no boost config id is provided in the start request, the system will choose a VM from the pool provisioned under the default config.", "id": "BoostConfig", "properties": { "accelerators": { @@ -1305,7 +1305,7 @@ "type": "boolean" }, "id": { - "description": "Optional. Required. The id to be used for the boost configuration.", + "description": "Required. The id to be used for the boost configuration.", "type": "string" }, "machineType": { @@ -1454,7 +1454,7 @@ "type": "array" }, "boostConfigs": { - "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use.", + "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. If specified, users will have the option to choose from the list of boost configs when starting a workstation.", "items": { "$ref": "BoostConfig" }, diff --git a/workstations/v1/workstations-gen.go b/workstations/v1/workstations-gen.go index 8a5c6bcbf60..085e85ce64e 100644 --- a/workstations/v1/workstations-gen.go +++ b/workstations/v1/workstations-gen.go @@ -423,7 +423,12 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BoostConfig: A configuration that workstations can boost to. +// BoostConfig: A boost configuration is a set of resources that a workstation +// can use to increase its performance. If a boost configuration is specified, +// when starting a workstation, users can choose to use a VM provisioned under +// the boost config by passing the boost config id in the start request. If no +// boost config id is provided in the start request, the system will choose a +// VM from the pool provisioned under the default config. type BoostConfig struct { // Accelerators: Optional. A list of the type and count of accelerator cards // attached to the boost instance. Defaults to `none`. @@ -451,7 +456,7 @@ type BoostConfig struct { // nested virtualization can only be enabled on boost configurations that // specify a machine_type in the N1 or N2 machine series. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // Id: Optional. Required. The id to be used for the boost configuration. + // Id: Required. The id to be used for the boost configuration. Id string `json:"id,omitempty"` // MachineType: Optional. The type of machine that boosted VM instances will // use—for example, `e2-standard-4`. For more information about machine types @@ -692,7 +697,9 @@ type GceInstance struct { // attached to the instance. Accelerators []*Accelerator `json:"accelerators,omitempty"` // BoostConfigs: Optional. A list of the boost configurations that workstations - // created using this workstation configuration are allowed to use. + // created using this workstation configuration are allowed to use. If + // specified, users will have the option to choose from the list of boost + // configs when starting a workstation. BoostConfigs []*BoostConfig `json:"boostConfigs,omitempty"` // BootDiskSizeGb: Optional. The size of the boot disk for the VM in gigabytes // (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB. @@ -2306,7 +2313,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -4693,7 +4700,8 @@ type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateA } // GenerateAccessToken: Returns a short-lived credential that can be used to -// send authenticated and authorized traffic to a workstation. +// send authenticated and authorized traffic to a workstation. Once generated +// this token cannot be revoked and is good for the lifetime of the token. // // - workstation: Name of the workstation for which the access token should be // generated. diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index 1bc6bee9061..f705471818a 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -112,7 +112,7 @@ "operations": { "methods": { "cancel": { - "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`.", + "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": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "workstations.projects.locations.operations.cancel", @@ -805,7 +805,7 @@ ] }, "generateAccessToken": { - "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. Once generated this token cannot be revoked and is good for the lifetime of the token.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", "httpMethod": "POST", "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", @@ -1127,7 +1127,7 @@ } } }, - "revision": "20241009", + "revision": "20241202", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1217,7 +1217,7 @@ "type": "object" }, "BoostConfig": { - "description": "A configuration that workstations can boost to.", + "description": "A boost configuration is a set of resources that a workstation can use to increase its performance. If a boost configuration is specified, when starting a workstation, users can choose to use a VM provisioned under the boost config by passing the boost config id in the start request. If no boost config id is provided in the start request, the system will choose a VM from the pool provisioned under the default config.", "id": "BoostConfig", "properties": { "accelerators": { @@ -1237,7 +1237,7 @@ "type": "boolean" }, "id": { - "description": "Optional. Required. The id to be used for the boost configuration.", + "description": "Required. The id to be used for the boost configuration.", "type": "string" }, "machineType": { @@ -1386,7 +1386,7 @@ "type": "array" }, "boostConfigs": { - "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use.", + "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. If specified, users will have the option to choose from the list of boost configs when starting a workstation.", "items": { "$ref": "BoostConfig" }, diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 09d4df563d4..617ff1df01e 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -423,7 +423,12 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BoostConfig: A configuration that workstations can boost to. +// BoostConfig: A boost configuration is a set of resources that a workstation +// can use to increase its performance. If a boost configuration is specified, +// when starting a workstation, users can choose to use a VM provisioned under +// the boost config by passing the boost config id in the start request. If no +// boost config id is provided in the start request, the system will choose a +// VM from the pool provisioned under the default config. type BoostConfig struct { // Accelerators: Optional. A list of the type and count of accelerator cards // attached to the boost instance. Defaults to `none`. @@ -451,7 +456,7 @@ type BoostConfig struct { // nested virtualization can only be enabled on boost configurations that // specify a machine_type in the N1 or N2 machine series. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // Id: Optional. Required. The id to be used for the boost configuration. + // Id: Required. The id to be used for the boost configuration. Id string `json:"id,omitempty"` // MachineType: Optional. The type of machine that boosted VM instances will // use—for example, `e2-standard-4`. For more information about machine types @@ -692,7 +697,9 @@ type GceInstance struct { // attached to the instance. Accelerators []*Accelerator `json:"accelerators,omitempty"` // BoostConfigs: Optional. A list of the boost configurations that workstations - // created using this workstation configuration are allowed to use. + // created using this workstation configuration are allowed to use. If + // specified, users will have the option to choose from the list of boost + // configs when starting a workstation. BoostConfigs []*BoostConfig `json:"boostConfigs,omitempty"` // BootDiskSizeGb: Optional. The size of the boot disk for the VM in gigabytes // (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB. @@ -2058,7 +2065,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -4445,7 +4452,8 @@ type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateA } // GenerateAccessToken: Returns a short-lived credential that can be used to -// send authenticated and authorized traffic to a workstation. +// send authenticated and authorized traffic to a workstation. Once generated +// this token cannot be revoked and is good for the lifetime of the token. // // - workstation: Name of the workstation for which the access token should be // generated.