From 0c7c227b6d00a2f22de990156f2f75a3862f77a7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 5 Sep 2024 00:22:21 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2772) --- aiplatform/v1/aiplatform-api.json | 227 +- aiplatform/v1/aiplatform-gen.go | 737 ++++- aiplatform/v1beta1/aiplatform-api.json | 253 +- aiplatform/v1beta1/aiplatform-gen.go | 393 ++- compute/v0.alpha/compute-api.json | 504 ++- compute/v0.alpha/compute-gen.go | 277 +- compute/v0.alpha/compute2-gen.go | 1616 ++++++++++ compute/v0.alpha/compute3-gen.go | 2692 +++++------------ discoveryengine/v1/discoveryengine-api.json | 128 +- discoveryengine/v1/discoveryengine-gen.go | 120 +- .../v1alpha/discoveryengine-api.json | 112 +- .../v1alpha/discoveryengine-gen.go | 110 +- .../v1beta/discoveryengine-api.json | 128 +- discoveryengine/v1beta/discoveryengine-gen.go | 120 +- file/v1beta1/file-api.json | 32 +- file/v1beta1/file-gen.go | 54 +- firebaseml/v2beta/firebaseml-api.json | 8 +- firebaseml/v2beta/firebaseml-gen.go | 1 + osconfig/v1alpha/osconfig-api.json | 4 +- osconfig/v1alpha/osconfig-gen.go | 2 +- vision/v1/vision-api.json | 12 +- vision/v1/vision-gen.go | 21 +- vision/v1p1beta1/vision-api.json | 12 +- vision/v1p1beta1/vision-gen.go | 21 +- vision/v1p2beta1/vision-api.json | 12 +- vision/v1p2beta1/vision-gen.go | 21 +- 26 files changed, 5423 insertions(+), 2194 deletions(-) diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 73eec00f87c..0d7b826ae47 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -2246,7 +2246,7 @@ "annotations": { "methods": { "list": { - "description": "Lists Annotations belongs to a dataitem", + "description": "Lists Annotations belongs to a dataitem This RPC is only available in InternalDatasetService. It is only used for exporting conversation data to CCAI Insights.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dataItems/{dataItemsId}/annotations", "httpMethod": "GET", "id": "aiplatform.projects.locations.datasets.dataItems.annotations.list", @@ -4956,6 +4956,37 @@ "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}/featureOnlineStores/{featureOnlineStoresId}:getIamPolicy", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureOnlineStores.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/[^/]+/featureOnlineStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists FeatureOnlineStores in a given project and location.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/featureOnlineStores", @@ -5035,6 +5066,65 @@ "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}/featureOnlineStores/{featureOnlineStoresId}:setIamPolicy", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureOnlineStores.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/[^/]+/featureOnlineStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+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": "v1/projects/{projectsId}/locations/{locationsId}/featureOnlineStores/{featureOnlineStoresId}:testIamPermissions", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureOnlineStores.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "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).", + "location": "query", + "repeated": true, + "type": "string" + }, + "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/[^/]+/featureOnlineStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -5156,6 +5246,37 @@ "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}/featureOnlineStores/{featureOnlineStoresId}/featureViews/{featureViewsId}:getIamPolicy", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureOnlineStores.featureViews.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/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists FeatureViews in a given FeatureOnlineStore.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/featureOnlineStores/{featureOnlineStoresId}/featureViews", @@ -5264,6 +5385,34 @@ "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}/featureOnlineStores/{featureOnlineStoresId}/featureViews/{featureViewsId}:setIamPolicy", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureOnlineStores.featureViews.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/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "sync": { "description": "Triggers on-demand sync for the FeatureView.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/featureOnlineStores/{featureOnlineStoresId}/featureViews/{featureViewsId}:sync", @@ -5291,6 +5440,37 @@ "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": "v1/projects/{projectsId}/locations/{locationsId}/featureOnlineStores/{featureOnlineStoresId}/featureViews/{featureViewsId}:testIamPermissions", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.featureOnlineStores.featureViews.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "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).", + "location": "query", + "repeated": true, + "type": "string" + }, + "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/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -17580,7 +17760,7 @@ } } }, - "revision": "20240816", + "revision": "20240828", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -22872,6 +23052,10 @@ "$ref": "GoogleCloudAiplatformV1BigQuerySource", "description": "Required. Immutable. The BigQuery source URI that points to either a BigQuery Table or View." }, + "dense": { + "description": "Optional. If set, all feature values will be fetched from a single row per unique entityId including nulls. If not set, will collapse all rows for each unique entityId into a singe row with any non-null values if present, if no non-null values are present will sync null. ex: If source has schema (entity_id, feature_timestamp, f0, f1) and values (e1, 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) If dense is set, (e1, 20, null) is synced to online stores. If dense is not set, (e1, 20, 15) is synced to online stores.", + "type": "boolean" + }, "entityIdColumns": { "description": "Optional. Columns to construct entity_id / row keys. If not provided defaults to `entity_id`.", "items": { @@ -22879,6 +23063,10 @@ }, "type": "array" }, + "staticDataSource": { + "description": "Optional. Set if the data source is not a time-series.", + "type": "boolean" + }, "timeSeries": { "$ref": "GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries", "description": "Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureView ) will treat time-series sources. If not set, will treat the source as a time-series source with `feature_timestamp` as timestamp column and no scan boundary." @@ -23292,6 +23480,10 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "vertexRagSource": { + "$ref": "GoogleCloudAiplatformV1FeatureViewVertexRagSource", + "description": "Optional. The Vertex RAG Source that the FeatureView is linked to." } }, "type": "object" @@ -23525,6 +23717,22 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1FeatureViewVertexRagSource": { + "description": "A Vertex Rag source for features that need to be synced to Online Store.", + "id": "GoogleCloudAiplatformV1FeatureViewVertexRagSource", + "properties": { + "ragCorpusId": { + "description": "Optional. The RAG corpus id corresponding to this FeatureView.", + "format": "int64", + "type": "string" + }, + "uri": { + "description": "Required. The BigQuery view/table URI that will be materialized on each manual sync trigger. The table/view is expected to have the following columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Featurestore": { "description": "Vertex AI Feature Store provides a centralized repository for organizing, storing, and serving ML features. The Featurestore is a top-level container for your features and their values.", "id": "GoogleCloudAiplatformV1Featurestore", @@ -24178,6 +24386,10 @@ "parameters": { "$ref": "GoogleCloudAiplatformV1Schema", "description": "Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1Schema", + "description": "Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function." } }, "type": "object" @@ -24195,7 +24407,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Required. The function response in JSON object format.", + "description": "Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output.", "type": "object" } }, @@ -24344,6 +24556,7 @@ "type": "integer" }, "totalTokenCount": { + "description": "Total token count for prompt and response candidates.", "format": "int32", "type": "integer" } @@ -32427,7 +32640,7 @@ "LOW_COST", "STANDARD", "SPOT", - "DWS_FLEX_START" + "FLEX_START" ], "enumDeprecated": [ false, @@ -32443,7 +32656,7 @@ "Deprecated. Low cost by making potential use of spot resources.", "Standard provisioning strategy uses regular on-demand resources.", "Spot provisioning strategy uses spot resources.", - "DWS Flex start strategy uses DWS to queue for resources." + "Flex Start strategy uses DWS to queue for resources." ], "type": "string" }, @@ -32456,7 +32669,7 @@ "type": "object" }, "GoogleCloudAiplatformV1Schema": { - "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed.", + "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed.", "id": "GoogleCloudAiplatformV1Schema", "properties": { "default": { @@ -37859,7 +38072,7 @@ "type": "object" }, "GoogleCloudAiplatformV1SyncFeatureViewResponse": { - "description": "Respose message for FeatureOnlineStoreAdminService.SyncFeatureView.", + "description": "Response message for FeatureOnlineStoreAdminService.SyncFeatureView.", "id": "GoogleCloudAiplatformV1SyncFeatureViewResponse", "properties": { "featureViewSync": { diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index cb450856922..e51dab4d1cd 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -8926,9 +8926,20 @@ type GoogleCloudAiplatformV1FeatureGroupBigQuery struct { // BigQuerySource: Required. Immutable. The BigQuery source URI that points to // either a BigQuery Table or View. BigQuerySource *GoogleCloudAiplatformV1BigQuerySource `json:"bigQuerySource,omitempty"` + // Dense: Optional. If set, all feature values will be fetched from a single + // row per unique entityId including nulls. If not set, will collapse all rows + // for each unique entityId into a singe row with any non-null values if + // present, if no non-null values are present will sync null. ex: If source has + // schema (entity_id, feature_timestamp, f0, f1) and values (e1, + // 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) + // If dense is set, (e1, 20, null) is synced to online stores. If dense is not + // set, (e1, 20, 15) is synced to online stores. + Dense bool `json:"dense,omitempty"` // EntityIdColumns: Optional. Columns to construct entity_id / row keys. If not // provided defaults to `entity_id`. EntityIdColumns []string `json:"entityIdColumns,omitempty"` + // StaticDataSource: Optional. Set if the data source is not a time-series. + StaticDataSource bool `json:"staticDataSource,omitempty"` // TimeSeries: Optional. If the source is a time-series source, this can be set // to control how downstream sources (ex: FeatureView ) will treat time-series // sources. If not set, will treat the source as a time-series source with @@ -9538,6 +9549,9 @@ type GoogleCloudAiplatformV1FeatureView struct { SyncConfig *GoogleCloudAiplatformV1FeatureViewSyncConfig `json:"syncConfig,omitempty"` // UpdateTime: Output only. Timestamp when this FeatureView was last updated. UpdateTime string `json:"updateTime,omitempty"` + // VertexRagSource: Optional. The Vertex RAG Source that the FeatureView is + // linked to. + VertexRagSource *GoogleCloudAiplatformV1FeatureViewVertexRagSource `json:"vertexRagSource,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -9876,6 +9890,36 @@ func (s GoogleCloudAiplatformV1FeatureViewSyncSyncSummary) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1FeatureViewVertexRagSource: A Vertex Rag source for +// features that need to be synced to Online Store. +type GoogleCloudAiplatformV1FeatureViewVertexRagSource struct { + // RagCorpusId: Optional. The RAG corpus id corresponding to this FeatureView. + RagCorpusId int64 `json:"ragCorpusId,omitempty,string"` + // Uri: Required. The BigQuery view/table URI that will be materialized on each + // manual sync trigger. The table/view is expected to have the following + // columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE + // file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE + // chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE + // embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpusId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RagCorpusId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1FeatureViewVertexRagSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FeatureViewVertexRagSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1Featurestore: Vertex AI Feature Store provides a // centralized repository for organizing, storing, and serving ML features. The // Featurestore is a top-level container for your features and their values. @@ -10980,6 +11024,10 @@ type GoogleCloudAiplatformV1FunctionDeclaration struct { // optional parameter: type: OBJECT properties: param1: type: STRING param2: // type: INTEGER required: - param1 Parameters *GoogleCloudAiplatformV1Schema `json:"parameters,omitempty"` + // Response: Optional. Describes the output from this function in JSON Schema + // format. Reflects the Open API 3.03 Response Object. The Schema defines the + // type used for the response value of the function. + Response *GoogleCloudAiplatformV1Schema `json:"response,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 @@ -11007,7 +11055,10 @@ type GoogleCloudAiplatformV1FunctionResponse struct { // Name: Required. The name of the function to call. Matches // [FunctionDeclaration.name] and [FunctionCall.name]. Name string `json:"name,omitempty"` - // Response: Required. The function response in JSON object format. + // Response: Required. The function response in JSON object format. Use + // "output" key to specify function output and "error" key to specify error + // details (if any). If "output" and "error" keys are not specified, then whole + // "response" is treated as function output. Response googleapi.RawMessage `json:"response,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 @@ -11196,7 +11247,8 @@ type GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata struct { // set, this is still the total effective prompt size meaning this includes the // number of tokens in the cached content. PromptTokenCount int64 `json:"promptTokenCount,omitempty"` - TotalTokenCount int64 `json:"totalTokenCount,omitempty"` + // TotalTokenCount: Total token count for prompt and response candidates. + TotalTokenCount int64 `json:"totalTokenCount,omitempty"` // ForceSendFields is a list of field names (e.g. "CandidatesTokenCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -22332,8 +22384,7 @@ type GoogleCloudAiplatformV1Scheduling struct { // "STANDARD" - Standard provisioning strategy uses regular on-demand // resources. // "SPOT" - Spot provisioning strategy uses spot resources. - // "DWS_FLEX_START" - DWS Flex start strategy uses DWS to queue for - // resources. + // "FLEX_START" - Flex Start strategy uses DWS to queue for resources. Strategy string `json:"strategy,omitempty"` // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` @@ -22357,8 +22408,8 @@ func (s GoogleCloudAiplatformV1Scheduling) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1Schema: Schema is used to define the format of // input/output data. Represents a select subset of an OpenAPI 3.0 schema -// object (https://spec.openapis.org/oas/v3.0.3#schema). More fields may be -// added in the future as needed. +// object (https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may +// be added in the future as needed. type GoogleCloudAiplatformV1Schema struct { // Default: Optional. Default value of the data. Default interface{} `json:"default,omitempty"` @@ -30976,7 +31027,7 @@ func (s GoogleCloudAiplatformV1SupervisedTuningSpec) MarshalJSON() ([]byte, erro type GoogleCloudAiplatformV1SyncFeatureViewRequest struct { } -// GoogleCloudAiplatformV1SyncFeatureViewResponse: Respose message for +// GoogleCloudAiplatformV1SyncFeatureViewResponse: Response message for // FeatureOnlineStoreAdminService.SyncFeatureView. type GoogleCloudAiplatformV1SyncFeatureViewResponse struct { // FeatureViewSync: Format: @@ -41261,7 +41312,9 @@ type ProjectsLocationsDatasetsDataItemsAnnotationsListCall struct { header_ http.Header } -// List: Lists Annotations belongs to a dataitem +// 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 resource name of the DataItem to list Annotations from. // Format: @@ -51168,6 +51221,122 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallO return ret, nil } +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 @@ -51460,6 +51629,224 @@ 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 +} + +// 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 +} + +// 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. +// +// - 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 *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 *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 *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) 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 += "?" + 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.testIamPermissions" 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 *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + 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 ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall struct { s *Service parent string @@ -51895,6 +52282,122 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...goo return ret, nil } +type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall{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 *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 *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 *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) 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.featureViews.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) { + 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 ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall struct { s *Service parent string @@ -52297,6 +52800,112 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCa return ret, nil } +type ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall 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 *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 *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 *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return 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/{+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.featureViews.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) { + 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 ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall struct { s *Service featureView string @@ -52401,6 +53010,118 @@ 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 +} + +// 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. +// +// - 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { + 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 { + c.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 { + 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_) + 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 += "?" + 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.featureViews.testIamPermissions" 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + 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 ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall struct { s *Service name string diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 712436009e2..8a3a56881c8 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -2836,7 +2836,7 @@ "annotations": { "methods": { "list": { - "description": "Lists Annotations belongs to a dataitem", + "description": "Lists Annotations belongs to a dataitem This RPC is only available in InternalDatasetService. It is only used for exporting conversation data to CCAI Insights.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dataItems/{dataItemsId}/annotations", "httpMethod": "GET", "id": "aiplatform.projects.locations.datasets.dataItems.annotations.list", @@ -5714,7 +5714,8 @@ "$ref": "GoogleCloudAiplatformV1beta1ListExtensionsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" ] }, "patch": { @@ -16493,6 +16494,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "patch": { + "description": "Updates a RagCorpus.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}", + "httpMethod": "PATCH", + "id": "aiplatform.projects.locations.ragCorpora.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the RagCorpus.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1RagCorpus" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -21058,7 +21087,7 @@ } } }, - "revision": "20240816", + "revision": "20240828", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -21614,6 +21643,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ApiAuth": { + "description": "The generic reusable api auth config.", + "id": "GoogleCloudAiplatformV1beta1ApiAuth", + "properties": { + "apiKeyConfig": { + "$ref": "GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig", + "description": "The API secret." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig": { "description": "The API secret.", "id": "GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig", @@ -22854,6 +22894,43 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "usageMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1CachedContentUsageMetadata", + "description": "Output only. Metadata on the usage of the cached content.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1CachedContentUsageMetadata": { + "description": "Metadata on the usage of the cached content.", + "id": "GoogleCloudAiplatformV1beta1CachedContentUsageMetadata", + "properties": { + "audioDurationSeconds": { + "description": "Duration of audio in seconds.", + "format": "int32", + "type": "integer" + }, + "imageCount": { + "description": "Number of images.", + "format": "int32", + "type": "integer" + }, + "textCount": { + "description": "Number of text characters.", + "format": "int32", + "type": "integer" + }, + "totalTokenCount": { + "description": "Total number of tokens that the cached content consumes.", + "format": "int32", + "type": "integer" + }, + "videoDurationSeconds": { + "description": "Duration of video in seconds.", + "format": "int32", + "type": "integer" } }, "type": "object" @@ -23400,6 +23477,35 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1CorpusStatus": { + "description": "RagCorpus status.", + "id": "GoogleCloudAiplatformV1beta1CorpusStatus", + "properties": { + "errorStatus": { + "description": "Output only. Only when the `state` field is ERROR.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. RagCorpus life state.", + "enum": [ + "UNKNOWN", + "INITIALIZED", + "ACTIVE", + "ERROR" + ], + "enumDescriptions": [ + "This state is not supposed to happen.", + "RagCorpus resource entry is initialized, but hasn't done validation.", + "RagCorpus is provisioned successfully and is ready to serve.", + "RagCorpus is in a problematic situation. See `error_message` field for details." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1CountTokensRequest": { "description": "Request message for PredictionService.CountTokens.", "id": "GoogleCloudAiplatformV1beta1CountTokensRequest", @@ -27086,6 +27192,10 @@ "$ref": "GoogleCloudAiplatformV1beta1BigQuerySource", "description": "Required. Immutable. The BigQuery source URI that points to either a BigQuery Table or View." }, + "dense": { + "description": "Optional. If set, all feature values will be fetched from a single row per unique entityId including nulls. If not set, will collapse all rows for each unique entityId into a singe row with any non-null values if present, if no non-null values are present will sync null. ex: If source has schema (entity_id, feature_timestamp, f0, f1) and values (e1, 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) If dense is set, (e1, 20, null) is synced to online stores. If dense is not set, (e1, 20, 15) is synced to online stores.", + "type": "boolean" + }, "entityIdColumns": { "description": "Optional. Columns to construct entity_id / row keys. If not provided defaults to `entity_id`.", "items": { @@ -27093,6 +27203,10 @@ }, "type": "array" }, + "staticDataSource": { + "description": "Optional. Set if the data source is not a time-series.", + "type": "boolean" + }, "timeSeries": { "$ref": "GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries", "description": "Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureView ) will treat time-series sources. If not set, will treat the source as a time-series source with `feature_timestamp` as timestamp column and no scan boundary." @@ -27547,6 +27661,10 @@ "$ref": "GoogleCloudAiplatformV1beta1FeatureViewVectorSearchConfig", "deprecated": true, "description": "Optional. Deprecated: please use FeatureView.index_config instead." + }, + "vertexRagSource": { + "$ref": "GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource", + "description": "Optional. The Vertex RAG Source that the FeatureView is linked to." } }, "type": "object" @@ -27848,6 +27966,22 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource": { + "description": "A Vertex Rag source for features that need to be synced to Online Store.", + "id": "GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource", + "properties": { + "ragCorpusId": { + "description": "Optional. The RAG corpus id corresponding to this FeatureView.", + "format": "int64", + "type": "string" + }, + "uri": { + "description": "Required. The BigQuery view/table URI that will be materialized on each manual sync trigger. The table/view is expected to have the following columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Featurestore": { "description": "Vertex AI Feature Store provides a centralized repository for organizing, storing, and serving ML features. The Featurestore is a top-level container for your features and their values.", "id": "GoogleCloudAiplatformV1beta1Featurestore", @@ -28172,6 +28306,33 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1FileStatus": { + "description": "RagFile status.", + "id": "GoogleCloudAiplatformV1beta1FileStatus", + "properties": { + "errorStatus": { + "description": "Output only. Only when the `state` field is ERROR.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. RagFile state.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "ERROR" + ], + "enumDescriptions": [ + "RagFile state is unspecified.", + "RagFile resource has been created and indexed successfully.", + "RagFile resource is in a problematic state. See `error_message` field for details." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1FilterSplit": { "description": "Assigns input data to training, validation, and test sets based on the given filters, data pieces not matched by any filter are ignored. Currently only supported for Datasets containing DataItems. If any of the filters in this message are to match nothing, then they can be set as '-' (the minus sign). Supported only for unstructured Datasets. ", "id": "GoogleCloudAiplatformV1beta1FilterSplit", @@ -28548,7 +28709,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Required. The function response in JSON object format.", + "description": "Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output.", "type": "object" } }, @@ -28725,6 +28886,12 @@ "description": "Usage metadata about response(s).", "id": "GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata", "properties": { + "cachedContentTokenCount": { + "description": "Output only. Number of tokens in the cached part in the input (the cached content).", + "format": "int32", + "readOnly": true, + "type": "integer" + }, "candidatesTokenCount": { "description": "Number of tokens in the response(s).", "format": "int32", @@ -28736,6 +28903,7 @@ "type": "integer" }, "totalTokenCount": { + "description": "Total token count for prompt and response candidates.", "format": "int32", "type": "integer" } @@ -37054,6 +37222,11 @@ "description": "A RagCorpus is a RagFile container and a project can have multiple RagCorpora.", "id": "GoogleCloudAiplatformV1beta1RagCorpus", "properties": { + "corpusStatus": { + "$ref": "GoogleCloudAiplatformV1beta1CorpusStatus", + "description": "Output only. RagCorpus state.", + "readOnly": true + }, "createTime": { "description": "Output only. Timestamp when this RagCorpus was created.", "format": "google-datetime", @@ -37077,6 +37250,10 @@ "$ref": "GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig", "description": "Optional. Immutable. The embedding model config of the RagCorpus." }, + "ragVectorDbConfig": { + "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfig", + "description": "Optional. Immutable. The Vector DB config of the RagCorpus." + }, "updateTime": { "description": "Output only. Timestamp when this RagCorpus was last updated.", "format": "google-datetime", @@ -37192,6 +37369,11 @@ "description": "Required. The display name of the RagFile. The name can be up to 128 characters long and can consist of any UTF-8 characters.", "type": "string" }, + "fileStatus": { + "$ref": "GoogleCloudAiplatformV1beta1FileStatus", + "description": "Output only. State of the RagFile.", + "readOnly": true + }, "gcsSource": { "$ref": "GoogleCloudAiplatformV1beta1GcsSource", "description": "Output only. Google Cloud Storage location of the RagFile. It does not support wildcards in the Cloud Storage uri for now.", @@ -37305,6 +37487,61 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RagVectorDbConfig": { + "description": "Config for the Vector DB to use for RAG.", + "id": "GoogleCloudAiplatformV1beta1RagVectorDbConfig", + "properties": { + "apiAuth": { + "$ref": "GoogleCloudAiplatformV1beta1ApiAuth", + "description": "Authentication config for the chosen Vector DB." + }, + "ragManagedDb": { + "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb", + "description": "The config for the RAG-managed Vector DB." + }, + "vertexFeatureStore": { + "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore", + "description": "The config for the Vertex Feature Store." + }, + "weaviate": { + "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate", + "description": "The config for the Weaviate." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb": { + "description": "The config for the default RAG-managed Vector DB.", + "id": "GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore": { + "description": "The config for the Vertex Feature Store.", + "id": "GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore", + "properties": { + "featureViewResourceName": { + "description": "The resource name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate": { + "description": "The config for the Weaviate.", + "id": "GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate", + "properties": { + "collectionName": { + "description": "The corresponding collection this corpus maps to. This value cannot be changed after it's set.", + "type": "string" + }, + "httpEndpoint": { + "description": "Weaviate DB instance HTTP endpoint. e.g. 34.56.78.90:8080 Vertex RAG only supports HTTP connection to Weaviate. This value cannot be changed after it's set.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RawPredictRequest": { "description": "Request message for PredictionService.RawPredict.", "id": "GoogleCloudAiplatformV1beta1RawPredictRequest", @@ -38688,7 +38925,7 @@ "LOW_COST", "STANDARD", "SPOT", - "DWS_FLEX_START" + "FLEX_START" ], "enumDeprecated": [ false, @@ -38704,7 +38941,7 @@ "Deprecated. Low cost by making potential use of spot resources.", "Standard provisioning strategy uses regular on-demand resources.", "Spot provisioning strategy uses spot resources.", - "DWS Flex start strategy uses DWS to queue for resources." + "Flex Start strategy uses DWS to queue for resources." ], "type": "string" }, @@ -38717,7 +38954,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1Schema": { - "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed.", + "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed.", "id": "GoogleCloudAiplatformV1beta1Schema", "properties": { "default": { @@ -44282,7 +44519,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1SyncFeatureViewResponse": { - "description": "Respose message for FeatureOnlineStoreAdminService.SyncFeatureView.", + "description": "Response message for FeatureOnlineStoreAdminService.SyncFeatureView.", "id": "GoogleCloudAiplatformV1beta1SyncFeatureViewResponse", "properties": { "featureViewSync": { diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 1c6a0879bf3..0cdbb2dc4b5 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -2425,6 +2425,28 @@ func (s GoogleCloudAiplatformV1beta1AnnotationSpec) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ApiAuth: The generic reusable api auth config. +type GoogleCloudAiplatformV1beta1ApiAuth struct { + // ApiKeyConfig: The API secret. + ApiKeyConfig *GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig `json:"apiKeyConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiKeyConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiKeyConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1ApiAuth) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ApiAuth + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig: The API secret. type GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig struct { // ApiKeySecretVersion: Required. The SecretManager secret version resource @@ -4355,6 +4377,8 @@ type GoogleCloudAiplatformV1beta1CachedContent struct { Ttl string `json:"ttl,omitempty"` // UpdateTime: Output only. When the cache entry was last updated in UTC time. UpdateTime string `json:"updateTime,omitempty"` + // UsageMetadata: Output only. Metadata on the usage of the cached content. + UsageMetadata *GoogleCloudAiplatformV1beta1CachedContentUsageMetadata `json:"usageMetadata,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -4376,6 +4400,37 @@ func (s GoogleCloudAiplatformV1beta1CachedContent) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1CachedContentUsageMetadata: Metadata on the +// usage of the cached content. +type GoogleCloudAiplatformV1beta1CachedContentUsageMetadata struct { + // AudioDurationSeconds: Duration of audio in seconds. + AudioDurationSeconds int64 `json:"audioDurationSeconds,omitempty"` + // ImageCount: Number of images. + ImageCount int64 `json:"imageCount,omitempty"` + // TextCount: Number of text characters. + TextCount int64 `json:"textCount,omitempty"` + // TotalTokenCount: Total number of tokens that the cached content consumes. + TotalTokenCount int64 `json:"totalTokenCount,omitempty"` + // VideoDurationSeconds: Duration of video in seconds. + VideoDurationSeconds int64 `json:"videoDurationSeconds,omitempty"` + // ForceSendFields is a list of field names (e.g. "AudioDurationSeconds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AudioDurationSeconds") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1CachedContentUsageMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CachedContentUsageMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1CancelBatchPredictionJobRequest: Request message // for JobService.CancelBatchPredictionJob. type GoogleCloudAiplatformV1beta1CancelBatchPredictionJobRequest struct { @@ -5079,6 +5134,38 @@ func (s GoogleCloudAiplatformV1beta1CopyModelResponse) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1CorpusStatus: RagCorpus status. +type GoogleCloudAiplatformV1beta1CorpusStatus struct { + // ErrorStatus: Output only. Only when the `state` field is ERROR. + ErrorStatus string `json:"errorStatus,omitempty"` + // State: Output only. RagCorpus life state. + // + // Possible values: + // "UNKNOWN" - This state is not supposed to happen. + // "INITIALIZED" - RagCorpus resource entry is initialized, but hasn't done + // validation. + // "ACTIVE" - RagCorpus is provisioned successfully and is ready to serve. + // "ERROR" - RagCorpus is in a problematic situation. See `error_message` + // field for details. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorStatus") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ErrorStatus") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1CorpusStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CorpusStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1CountTokensRequest: Request message for // PredictionService.CountTokens. type GoogleCloudAiplatformV1beta1CountTokensRequest struct { @@ -10263,9 +10350,20 @@ type GoogleCloudAiplatformV1beta1FeatureGroupBigQuery struct { // BigQuerySource: Required. Immutable. The BigQuery source URI that points to // either a BigQuery Table or View. BigQuerySource *GoogleCloudAiplatformV1beta1BigQuerySource `json:"bigQuerySource,omitempty"` + // Dense: Optional. If set, all feature values will be fetched from a single + // row per unique entityId including nulls. If not set, will collapse all rows + // for each unique entityId into a singe row with any non-null values if + // present, if no non-null values are present will sync null. ex: If source has + // schema (entity_id, feature_timestamp, f0, f1) and values (e1, + // 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) + // If dense is set, (e1, 20, null) is synced to online stores. If dense is not + // set, (e1, 20, 15) is synced to online stores. + Dense bool `json:"dense,omitempty"` // EntityIdColumns: Optional. Columns to construct entity_id / row keys. If not // provided defaults to `entity_id`. EntityIdColumns []string `json:"entityIdColumns,omitempty"` + // StaticDataSource: Optional. Set if the data source is not a time-series. + StaticDataSource bool `json:"staticDataSource,omitempty"` // TimeSeries: Optional. If the source is a time-series source, this can be set // to control how downstream sources (ex: FeatureView ) will treat time-series // sources. If not set, will treat the source as a time-series source with @@ -10935,6 +11033,9 @@ type GoogleCloudAiplatformV1beta1FeatureView struct { // VectorSearchConfig: Optional. Deprecated: please use // FeatureView.index_config instead. VectorSearchConfig *GoogleCloudAiplatformV1beta1FeatureViewVectorSearchConfig `json:"vectorSearchConfig,omitempty"` + // VertexRagSource: Optional. The Vertex RAG Source that the FeatureView is + // linked to. + VertexRagSource *GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource `json:"vertexRagSource,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -11360,6 +11461,36 @@ func (s GoogleCloudAiplatformV1beta1FeatureViewVectorSearchConfigTreeAHConfig) M return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource: A Vertex Rag source +// for features that need to be synced to Online Store. +type GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource struct { + // RagCorpusId: Optional. The RAG corpus id corresponding to this FeatureView. + RagCorpusId int64 `json:"ragCorpusId,omitempty,string"` + // Uri: Required. The BigQuery view/table URI that will be materialized on each + // manual sync trigger. The table/view is expected to have the following + // columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE + // file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE + // chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE + // embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpusId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RagCorpusId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Featurestore: Vertex AI Feature Store provides a // centralized repository for organizing, storing, and serving ML features. The // Featurestore is a top-level container for your features and their values. @@ -11835,6 +11966,36 @@ func (s GoogleCloudAiplatformV1beta1FileData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1FileStatus: RagFile status. +type GoogleCloudAiplatformV1beta1FileStatus struct { + // ErrorStatus: Output only. Only when the `state` field is ERROR. + ErrorStatus string `json:"errorStatus,omitempty"` + // State: Output only. RagFile state. + // + // Possible values: + // "STATE_UNSPECIFIED" - RagFile state is unspecified. + // "ACTIVE" - RagFile resource has been created and indexed successfully. + // "ERROR" - RagFile resource is in a problematic state. See `error_message` + // field for details. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorStatus") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ErrorStatus") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1FileStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FileStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1FilterSplit: Assigns input data to training, // validation, and test sets based on the given filters, data pieces not // matched by any filter are ignored. Currently only supported for Datasets @@ -12514,7 +12675,10 @@ type GoogleCloudAiplatformV1beta1FunctionResponse struct { // Name: Required. The name of the function to call. Matches // [FunctionDeclaration.name] and [FunctionCall.name]. Name string `json:"name,omitempty"` - // Response: Required. The function response in JSON object format. + // Response: Required. The function response in JSON object format. Use + // "output" key to specify function output and "error" key to specify error + // details (if any). If "output" and "error" keys are not specified, then whole + // "response" is treated as function output. Response googleapi.RawMessage `json:"response,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 @@ -12764,22 +12928,26 @@ func (s GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback) Marsh // GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata: Usage // metadata about response(s). type GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata struct { + // CachedContentTokenCount: Output only. Number of tokens in the cached part in + // the input (the cached content). + CachedContentTokenCount int64 `json:"cachedContentTokenCount,omitempty"` // CandidatesTokenCount: Number of tokens in the response(s). CandidatesTokenCount int64 `json:"candidatesTokenCount,omitempty"` // PromptTokenCount: Number of tokens in the request. When `cached_content` is // set, this is still the total effective prompt size meaning this includes the // number of tokens in the cached content. PromptTokenCount int64 `json:"promptTokenCount,omitempty"` - TotalTokenCount int64 `json:"totalTokenCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "CandidatesTokenCount") to + // TotalTokenCount: Total token count for prompt and response candidates. + TotalTokenCount int64 `json:"totalTokenCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "CachedContentTokenCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CandidatesTokenCount") 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. "CachedContentTokenCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -24237,6 +24405,8 @@ func (s *GoogleCloudAiplatformV1beta1RagContextsContext) UnmarshalJSON(data []by // GoogleCloudAiplatformV1beta1RagCorpus: A RagCorpus is a RagFile container // and a project can have multiple RagCorpora. type GoogleCloudAiplatformV1beta1RagCorpus struct { + // CorpusStatus: Output only. RagCorpus state. + CorpusStatus *GoogleCloudAiplatformV1beta1CorpusStatus `json:"corpusStatus,omitempty"` // CreateTime: Output only. Timestamp when this RagCorpus was created. CreateTime string `json:"createTime,omitempty"` // Description: Optional. The description of the RagCorpus. @@ -24249,18 +24419,21 @@ type GoogleCloudAiplatformV1beta1RagCorpus struct { // RagEmbeddingModelConfig: Optional. Immutable. The embedding model config of // the RagCorpus. RagEmbeddingModelConfig *GoogleCloudAiplatformV1beta1RagEmbeddingModelConfig `json:"ragEmbeddingModelConfig,omitempty"` + // RagVectorDbConfig: Optional. Immutable. The Vector DB config of the + // RagCorpus. + RagVectorDbConfig *GoogleCloudAiplatformV1beta1RagVectorDbConfig `json:"ragVectorDbConfig,omitempty"` // UpdateTime: Output only. Timestamp when this RagCorpus was last updated. UpdateTime string `json:"updateTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "CorpusStatus") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "CorpusStatus") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -24446,6 +24619,8 @@ type GoogleCloudAiplatformV1beta1RagFile struct { // DisplayName: Required. The display name of the RagFile. The name can be up // to 128 characters long and can consist of any UTF-8 characters. DisplayName string `json:"displayName,omitempty"` + // FileStatus: Output only. State of the RagFile. + FileStatus *GoogleCloudAiplatformV1beta1FileStatus `json:"fileStatus,omitempty"` // GcsSource: Output only. Google Cloud Storage location of the RagFile. It // does not support wildcards in the Cloud Storage uri for now. GcsSource *GoogleCloudAiplatformV1beta1GcsSource `json:"gcsSource,omitempty"` @@ -24604,6 +24779,93 @@ func (s *GoogleCloudAiplatformV1beta1RagQueryRanking) UnmarshalJSON(data []byte) return nil } +// GoogleCloudAiplatformV1beta1RagVectorDbConfig: Config for the Vector DB to +// use for RAG. +type GoogleCloudAiplatformV1beta1RagVectorDbConfig struct { + // ApiAuth: Authentication config for the chosen Vector DB. + ApiAuth *GoogleCloudAiplatformV1beta1ApiAuth `json:"apiAuth,omitempty"` + // RagManagedDb: The config for the RAG-managed Vector DB. + RagManagedDb *GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb `json:"ragManagedDb,omitempty"` + // VertexFeatureStore: The config for the Vertex Feature Store. + VertexFeatureStore *GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore `json:"vertexFeatureStore,omitempty"` + // Weaviate: The config for the Weaviate. + Weaviate *GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate `json:"weaviate,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiAuth") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiAuth") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1RagVectorDbConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagVectorDbConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb: The config for +// the default RAG-managed Vector DB. +type GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb struct { +} + +// GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore: The config +// for the Vertex Feature Store. +type GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore struct { + // FeatureViewResourceName: The resource name of the FeatureView. Format: + // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_ + // store}/featureViews/{feature_view}` + FeatureViewResourceName string `json:"featureViewResourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "FeatureViewResourceName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FeatureViewResourceName") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate: The config for the +// Weaviate. +type GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate struct { + // CollectionName: The corresponding collection this corpus maps to. This value + // cannot be changed after it's set. + CollectionName string `json:"collectionName,omitempty"` + // HttpEndpoint: Weaviate DB instance HTTP endpoint. e.g. 34.56.78.90:8080 + // Vertex RAG only supports HTTP connection to Weaviate. This value cannot be + // changed after it's set. + HttpEndpoint string `json:"httpEndpoint,omitempty"` + // ForceSendFields is a list of field names (e.g. "CollectionName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CollectionName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RawPredictRequest: Request message for // PredictionService.RawPredict. type GoogleCloudAiplatformV1beta1RawPredictRequest struct { @@ -26654,8 +26916,7 @@ type GoogleCloudAiplatformV1beta1Scheduling struct { // "STANDARD" - Standard provisioning strategy uses regular on-demand // resources. // "SPOT" - Spot provisioning strategy uses spot resources. - // "DWS_FLEX_START" - DWS Flex start strategy uses DWS to queue for - // resources. + // "FLEX_START" - Flex Start strategy uses DWS to queue for resources. Strategy string `json:"strategy,omitempty"` // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` @@ -26679,8 +26940,8 @@ func (s GoogleCloudAiplatformV1beta1Scheduling) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1beta1Schema: Schema is used to define the format of // input/output data. Represents a select subset of an OpenAPI 3.0 schema -// object (https://spec.openapis.org/oas/v3.0.3#schema). More fields may be -// added in the future as needed. +// object (https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may +// be added in the future as needed. type GoogleCloudAiplatformV1beta1Schema struct { // Default: Optional. Default value of the data. Default interface{} `json:"default,omitempty"` @@ -35580,7 +35841,7 @@ func (s GoogleCloudAiplatformV1beta1SupervisedTuningSpec) MarshalJSON() ([]byte, type GoogleCloudAiplatformV1beta1SyncFeatureViewRequest struct { } -// GoogleCloudAiplatformV1beta1SyncFeatureViewResponse: Respose message for +// GoogleCloudAiplatformV1beta1SyncFeatureViewResponse: Response message for // FeatureOnlineStoreAdminService.SyncFeatureView. type GoogleCloudAiplatformV1beta1SyncFeatureViewResponse struct { // FeatureViewSync: Format: @@ -48347,7 +48608,9 @@ type ProjectsLocationsDatasetsDataItemsAnnotationsListCall struct { header_ http.Header } -// List: Lists Annotations belongs to a dataitem +// 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 resource name of the DataItem to list Annotations from. // Format: @@ -98826,6 +99089,108 @@ func (c *ProjectsLocationsRagCorporaListCall) Pages(ctx context.Context, f func( } } +type ProjectsLocationsRagCorporaPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1ragcorpus *GoogleCloudAiplatformV1beta1RagCorpus + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a RagCorpus. +// +// - name: Output only. The resource name of the RagCorpus. +func (r *ProjectsLocationsRagCorporaService) Patch(name string, googlecloudaiplatformv1beta1ragcorpus *GoogleCloudAiplatformV1beta1RagCorpus) *ProjectsLocationsRagCorporaPatchCall { + c := &ProjectsLocationsRagCorporaPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1ragcorpus = googlecloudaiplatformv1beta1ragcorpus + return 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 { + 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 { + c.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 { + 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_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1ragcorpus) + 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.ragCorpora.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 *ProjectsLocationsRagCorporaPatchCall) 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 ProjectsLocationsRagCorporaOperationsCancelCall struct { s *Service name string diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index cef2a0b61de..76dd9a4cb4a 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -26471,6 +26471,110 @@ }, "regionInstanceGroupManagerResizeRequests": { "methods": { + "cancel": { + "description": "Cancels the specified resize request. Cancelled resize request no longer waits for the resources to be provisioned. Cancel is only possible for requests that are in accepted state.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagerResizeRequests.cancel", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager", + "resizeRequest" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region scoping this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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. 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" + }, + "resizeRequest": { + "description": "The name of the resize request to cancel. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "description": "Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", + "httpMethod": "DELETE", + "id": "compute.regionInstanceGroupManagerResizeRequests.delete", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager", + "resizeRequest" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region scoping this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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. 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" + }, + "resizeRequest": { + "description": "The name of the resize request to delete. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "get": { "description": "Returns all of the details about the specified resize request.", "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", @@ -33995,6 +34099,125 @@ } } }, + "reservationBlocks": { + "methods": { + "get": { + "description": "Retrieves information about the specified reservation block.", + "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}", + "httpMethod": "GET", + "id": "compute.reservationBlocks.get", + "parameterOrder": [ + "project", + "zone", + "reservation", + "reservationBlock" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "required": true, + "type": "string" + }, + "reservation": { + "description": "The name of the reservation. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "reservationBlock": { + "description": "The name of the reservation block. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request. Zone name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}", + "response": { + "$ref": "ReservationBlocksGetResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "description": "Retrieves a list of reservation blocks under a single reservation.", + "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks", + "httpMethod": "GET", + "id": "compute.reservationBlocks.list", + "parameterOrder": [ + "project", + "zone", + "reservation" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "required": true, + "type": "string" + }, + "reservation": { + "description": "The name of the reservation. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + }, + "zone": { + "description": "Name of the zone for this request. Zone name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks", + "response": { + "$ref": "ReservationBlocksListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "reservations": { "methods": { "aggregatedList": { @@ -45055,7 +45278,7 @@ } } }, - "revision": "20240820", + "revision": "20240827", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -46471,6 +46694,11 @@ "description": "[Output Only] Contains output only fields.", "id": "AllocationResourceStatus", "properties": { + "reservationBlockCount": { + "description": "Indicates number of blocks for accelerator optimized family (applicable beyond A3 only).", + "format": "int32", + "type": "integer" + }, "specificSkuAllocation": { "$ref": "AllocationResourceStatusSpecificSKUAllocation", "description": "Allocation Properties of this reservation." @@ -81920,6 +82148,20 @@ "description": "Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format.", "type": "string" }, + "deploymentType": { + "description": "Specifies the deployment strategy for this reservation.", + "enum": [ + "DENSE", + "DEPLOYMENT_TYPE_UNSPECIFIED", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Number of deployment blocks, size, and topology is fixed during creation and does not change over time. Deployment will be expressed in terms of blocks.", + "Deployment type is unspecified.", + "Distribution of capacity in blocks is not static and can change over time. This is expected to have more obtainability over DENSE deployment. Deployment will not be expressed in terms of blocks." + ], + "type": "string" + }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" @@ -81929,6 +82171,20 @@ "format": "uint64", "type": "string" }, + "instanceTerminationAction": { + "description": "Instance termination action that will be invoked when the reservation is deleted.", + "enum": [ + "DELETE", + "INSTANCE_TERMINATION_ACTION_UNSPECIFIED", + "STOP" + ], + "enumDescriptions": [ + "Delete the VM.", + "Default value. This value is unused.", + "Stop the VM without storing in-memory content. default action." + ], + "type": "string" + }, "kind": { "default": "compute#reservation", "description": "[Output Only] Type of the resource. Always compute#reservations for reservations.", @@ -82206,6 +82462,233 @@ }, "type": "object" }, + "ReservationBlock": { + "description": "Represents a reservation block resource.", + "id": "ReservationBlock", + "properties": { + "count": { + "description": "[Output Only] Specifies the number of resources that are allocated in this block. It indicates the maximum number of VMs that a user can run on this particular block.", + "format": "int32", + "type": "integer" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "inUseCount": { + "description": "[Output Only] Indicates how many instances are in use on this block.", + "format": "int32", + "type": "integer" + }, + "kind": { + "description": "[Output Only] Type of the resource. Always compute#reservationBlock for reservation blocks.", + "type": "string" + }, + "locationPrefix": { + "description": "[Output Only] Obfuscated location where this reservation block physically resides in format /CCCC/GGGG. This matches the tripod specified in the VM topology information. Example: /USEAB1/0101/ is the location prefix in /USEAB1/0101/031/003", + "type": "string" + }, + "name": { + "description": "[Output Only] The name of this reservation block generated by Google Compute Engine. The name must be 1-63 characters long, and comply with RFC1035 @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + }, + "status": { + "description": "[Output Only] Status of the reservation block.", + "enum": [ + "CREATING", + "DELETING", + "INVALID", + "READY" + ], + "enumDescriptions": [ + "Resources are being allocated for the reservation block.", + "Reservation block is currently being deleted.", + "", + "Reservation block has allocated all its resources." + ], + "type": "string" + }, + "zone": { + "description": "[Output Only] Zone in which the reservation block resides.", + "type": "string" + } + }, + "type": "object" + }, + "ReservationBlocksGetResponse": { + "id": "ReservationBlocksGetResponse", + "properties": { + "resource": { + "$ref": "ReservationBlock" + } + }, + "type": "object" + }, + "ReservationBlocksListResponse": { + "description": "A list of reservation blocks under a single reservation.", + "id": "ReservationBlocksListResponse", + "properties": { + "id": { + "description": "Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of reservation block resources.", + "items": { + "$ref": "ReservationBlock" + }, + "type": "array" + }, + "kind": { + "default": "compute#reservationBlock", + "description": "Type of the resource. Always compute#reservationBlock for a list of reservation blocks.", + "type": "string" + }, + "nextPageToken": { + "description": "This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "ReservationList": { "id": "ReservationList", "properties": { @@ -87109,7 +87592,8 @@ "type": "array" }, "cloudArmorConfig": { - "$ref": "SecurityPolicyCloudArmorConfig" + "$ref": "SecurityPolicyCloudArmorConfig", + "deprecated": true }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", @@ -87123,6 +87607,7 @@ "type": "string" }, "displayName": { + "deprecated": true, "description": "User-provided name of the organization security policy. The name should be unique in the organization in which the security policy is created. This should only be used when SecurityPolicyType is FIREWALL. The name must be 1-63 characters long, and comply with https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" @@ -87171,6 +87656,7 @@ "type": "string" }, "ruleTupleCount": { + "deprecated": true, "description": "[Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples.", "format": "int32", "type": "integer" @@ -87427,6 +87913,7 @@ "type": "string" }, "displayName": { + "deprecated": true, "description": "[Output Only] The display name of the security policy of the association.", "type": "string" }, @@ -87464,6 +87951,7 @@ "id": "SecurityPolicyCloudArmorConfig", "properties": { "enableMl": { + "deprecated": true, "description": "If set to true, enables Cloud Armor Machine Learning.", "type": "boolean" } @@ -87678,6 +88166,7 @@ "type": "string" }, "direction": { + "deprecated": true, "description": "The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.", "enum": [ "EGRESS", @@ -87690,6 +88179,7 @@ "type": "string" }, "enableLogging": { + "deprecated": true, "description": "Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on \"goto_next\" rules. This field may only be specified when the versioned_expr is set to FIREWALL.", "type": "boolean" }, @@ -87756,11 +88246,13 @@ "type": "string" }, "ruleTupleCount": { + "deprecated": true, "description": "[Output Only] Calculation of the complexity of a single firewall security policy rule.", "format": "int32", "type": "integer" }, "targetResources": { + "deprecated": true, "description": "A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.", "items": { "type": "string" @@ -87768,6 +88260,7 @@ "type": "array" }, "targetServiceAccounts": { + "deprecated": true, "description": "A list of service accounts indicating the sets of instances that are applied with this rule.", "items": { "type": "string" @@ -87839,6 +88332,7 @@ "id": "SecurityPolicyRuleMatcherConfig", "properties": { "destIpRanges": { + "deprecated": true, "description": "CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.", "items": { "type": "string" @@ -87846,6 +88340,7 @@ "type": "array" }, "destPorts": { + "deprecated": true, "description": "Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.", "items": { "$ref": "SecurityPolicyRuleMatcherConfigDestinationPort" @@ -87853,6 +88348,7 @@ "type": "array" }, "layer4Configs": { + "deprecated": true, "description": "Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.", "items": { "$ref": "SecurityPolicyRuleMatcherConfigLayer4Config" @@ -87873,10 +88369,12 @@ "id": "SecurityPolicyRuleMatcherConfigDestinationPort", "properties": { "ipProtocol": { + "deprecated": true, "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.", "type": "string" }, "ports": { + "deprecated": true, "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"]. This field may only be specified when versioned_expr is set to FIREWALL.", "items": { "type": "string" @@ -87890,10 +88388,12 @@ "id": "SecurityPolicyRuleMatcherConfigLayer4Config", "properties": { "ipProtocol": { + "deprecated": true, "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.", "type": "string" }, "ports": { + "deprecated": true, "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"]. This field may only be specified when versioned_expr is set to FIREWALL.", "items": { "type": "string" diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index ff1784c3d20..e1187135b77 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -246,6 +246,7 @@ func New(client *http.Client) (*Service, error) { s.RegionUrlMaps = NewRegionUrlMapsService(s) s.RegionZones = NewRegionZonesService(s) s.Regions = NewRegionsService(s) + s.ReservationBlocks = NewReservationBlocksService(s) s.Reservations = NewReservationsService(s) s.ResourcePolicies = NewResourcePoliciesService(s) s.Routers = NewRoutersService(s) @@ -449,6 +450,8 @@ type Service struct { Regions *RegionsService + ReservationBlocks *ReservationBlocksService + Reservations *ReservationsService ResourcePolicies *ResourcePoliciesService @@ -1267,6 +1270,15 @@ type RegionsService struct { s *Service } +func NewReservationBlocksService(s *Service) *ReservationBlocksService { + rs := &ReservationBlocksService{s: s} + return rs +} + +type ReservationBlocksService struct { + s *Service +} + func NewReservationsService(s *Service) *ReservationsService { rs := &ReservationsService{s: s} return rs @@ -3006,15 +3018,18 @@ func (s AllocationReservationSharingPolicy) MarshalJSON() ([]byte, error) { // AllocationResourceStatus: [Output Only] Contains output only fields. type AllocationResourceStatus struct { + // ReservationBlockCount: Indicates number of blocks for accelerator optimized + // family (applicable beyond A3 only). + ReservationBlockCount int64 `json:"reservationBlockCount,omitempty"` // SpecificSkuAllocation: Allocation Properties of this reservation. SpecificSkuAllocation *AllocationResourceStatusSpecificSKUAllocation `json:"specificSkuAllocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "SpecificSkuAllocation") to + // ForceSendFields is a list of field names (e.g. "ReservationBlockCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SpecificSkuAllocation") to + // NullFields is a list of field names (e.g. "ReservationBlockCount") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -43065,12 +43080,32 @@ type Reservation struct { // auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text // format. DeleteAtTime string `json:"deleteAtTime,omitempty"` + // DeploymentType: Specifies the deployment strategy for this reservation. + // + // Possible values: + // "DENSE" - Number of deployment blocks, size, and topology is fixed during + // creation and does not change over time. Deployment will be expressed in + // terms of blocks. + // "DEPLOYMENT_TYPE_UNSPECIFIED" - Deployment type is unspecified. + // "FLEXIBLE" - Distribution of capacity in blocks is not static and can + // change over time. This is expected to have more obtainability over DENSE + // deployment. Deployment will not be expressed in terms of blocks. + DeploymentType string `json:"deploymentType,omitempty"` // Description: An optional description of this resource. Provide this property // when you create the resource. Description string `json:"description,omitempty"` // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. Id uint64 `json:"id,omitempty,string"` + // InstanceTerminationAction: Instance termination action that will be invoked + // when the reservation is deleted. + // + // Possible values: + // "DELETE" - Delete the VM. + // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This value is + // unused. + // "STOP" - Stop the VM without storing in-memory content. default action. + InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` // Kind: [Output Only] Type of the resource. Always compute#reservations for // reservations. Kind string `json:"kind,omitempty"` @@ -43351,6 +43386,244 @@ func (s ReservationAggregatedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReservationBlock: Represents a reservation block resource. +type ReservationBlock struct { + // Count: [Output Only] Specifies the number of resources that are allocated in + // this block. It indicates the maximum number of VMs that a user can run on + // this particular block. + Count int64 `json:"count,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This identifier is + // defined by the server. + Id uint64 `json:"id,omitempty,string"` + // InUseCount: [Output Only] Indicates how many instances are in use on this + // block. + InUseCount int64 `json:"inUseCount,omitempty"` + // Kind: [Output Only] Type of the resource. Always compute#reservationBlock + // for reservation blocks. + Kind string `json:"kind,omitempty"` + // LocationPrefix: [Output Only] Obfuscated location where this reservation + // block physically resides in format /CCCC/GGGG. This matches the tripod + // specified in the VM topology information. Example: /USEAB1/0101/ is the + // location prefix in /USEAB1/0101/031/003 + LocationPrefix string `json:"locationPrefix,omitempty"` + // Name: [Output Only] The name of this reservation block generated by Google + // Compute Engine. The name must be 1-63 characters long, and comply with + // RFC1035 @pattern a-z (?:[-a-z0-9]{0,61}[a-z0-9])? + Name string `json:"name,omitempty"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // Status: [Output Only] Status of the reservation block. + // + // Possible values: + // "CREATING" - Resources are being allocated for the reservation block. + // "DELETING" - Reservation block is currently being deleted. + // "INVALID" + // "READY" - Reservation block has allocated all its resources. + Status string `json:"status,omitempty"` + // Zone: [Output Only] Zone in which the reservation block resides. + Zone string `json:"zone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReservationBlock) MarshalJSON() ([]byte, error) { + type NoMethod ReservationBlock + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ReservationBlocksGetResponse struct { + Resource *ReservationBlock `json:"resource,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Resource") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Resource") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReservationBlocksGetResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReservationBlocksGetResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ReservationBlocksListResponse: A list of reservation blocks under a single +// reservation. +type ReservationBlocksListResponse struct { + // Id: Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: A list of reservation block resources. + Items []*ReservationBlock `json:"items,omitempty"` + // Kind: Type of the resource. Always compute#reservationBlock for a list of + // reservation blocks. + Kind string `json:"kind,omitempty"` + // NextPageToken: This token allows you to get the next page of results for + // list requests. If the number of results is larger than maxResults, use the + // nextPageToken as a value for the query parameter pageToken in the next list + // request. Subsequent list requests will have their own nextPageToken to + // continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Warning: Informational warning message. + Warning *ReservationBlocksListResponseWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReservationBlocksListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReservationBlocksListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ReservationBlocksListResponseWarning: Informational warning message. +type ReservationBlocksListResponseWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*ReservationBlocksListResponseWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + 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 ReservationBlocksListResponseWarning) MarshalJSON() ([]byte, error) { + type NoMethod ReservationBlocksListResponseWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ReservationBlocksListResponseWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Key") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReservationBlocksListResponseWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ReservationBlocksListResponseWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ReservationList struct { // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index 3eb224a579a..49619b2c933 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -68988,3 +68988,1619 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil } + +type RegionBackendServicesDeleteCall struct { + s *Service + project string + region string + backendService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified regional BackendService resource. +// +// - backendService: Name of the BackendService resource to delete. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { + c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + 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. 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 *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { + 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 *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesDeleteCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.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 *RegionBackendServicesDeleteCall) 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 RegionBackendServicesGetCall struct { + s *Service + project string + region string + backendService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified regional BackendService resource. +// +// - backendService: Name of the BackendService resource to return. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { + c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { + 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 *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesGetCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendService.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, 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 := &BackendService{ + 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 RegionBackendServicesGetHealthCall struct { + s *Service + project string + region string + backendService string + resourcegroupreference *ResourceGroupReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetHealth: Gets the most recent health check results for this regional +// BackendService. +// +// - backendService: Name of the BackendService resource for which to get +// health. +// - project: . +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { + c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.resourcegroupreference = resourcegroupreference + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesGetHealthCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesGetHealthCall) 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.resourcegroupreference) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.getHealth" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceGroupHealth.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, 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 := &BackendServiceGroupHealth{ + 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 RegionBackendServicesGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) GetIamPolicy(project string, region string, resource string) *RegionBackendServicesGetIamPolicyCall { + c := &RegionBackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionBackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendServicesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetIamPolicyCall { + 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 *RegionBackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesGetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesGetIamPolicyCall) 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, "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 RegionBackendServicesInsertCall struct { + s *Service + project string + region string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a regional BackendService resource in the specified project +// using the data included in the request. For more information, see Backend +// services overview. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { + c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendservice = backendservice + 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. 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 *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { + 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 *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesInsertCall) 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.backendservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.insert" 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 *RegionBackendServicesInsertCall) 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 RegionBackendServicesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of regional BackendService resources available to +// the specified project in the given region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { + c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { + 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 *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesListCall) 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, "projects/{project}/regions/{region}/backendServices") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, 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 := &BackendServiceList{ + 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 *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) 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 RegionBackendServicesListUsableCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Retrieves an aggregated list of all usable backend services in +// the specified project in the given region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. It must be a string that +// meets the requirements in RFC1035. +func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { + c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesListUsableCall) 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, "projects/{project}/regions/{region}/backendServices/listUsable") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.listUsable" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceListUsable.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, 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 := &BackendServiceListUsable{ + 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 *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) 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 RegionBackendServicesPatchCall struct { + s *Service + project string + region string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified regional BackendService resource with the data +// included in the request. For more information, see Understanding backend +// services This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. +// +// - backendService: Name of the BackendService resource to patch. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { + c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.backendservice = backendservice + 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. 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 *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { + 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 *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesPatchCall) 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.backendservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.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 *RegionBackendServicesPatchCall) 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 RegionBackendServicesSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { + c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesSetIamPolicyCall) 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.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 RegionBackendServicesSetSecurityPolicyCall struct { + s *Service + project string + region string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the +// specified backend service. For more information, see Google Cloud Armor +// Overview +// +// - backendService: Name of the BackendService resource to which the security +// policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { + c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference + 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. 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 *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { + 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 *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesSetSecurityPolicyCall) 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.securitypolicyreference) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.setSecurityPolicy" 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 *RegionBackendServicesSetSecurityPolicyCall) 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 RegionBackendServicesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { + c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesTestIamPermissionsCall) 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.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + 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 RegionBackendServicesUpdateCall struct { + s *Service + project string + region string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the specified regional BackendService resource with the data +// included in the request. For more information, see Backend services overview +// . +// +// - backendService: Name of the BackendService resource to update. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { + c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.backendservice = backendservice + 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. 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 *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { + 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 *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesUpdateCall) 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.backendservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.update" 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 *RegionBackendServicesUpdateCall) 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 +} diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index 5ec2c80bfac..7ccdcc7c337 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -16,1622 +16,6 @@ import ( gensupport "google.golang.org/api/internal/gensupport" ) -type RegionBackendServicesDeleteCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional BackendService resource. -// -// - backendService: Name of the BackendService resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { - c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - 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. 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 *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { - 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 *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesDeleteCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.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 *RegionBackendServicesDeleteCall) 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 RegionBackendServicesGetCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional BackendService resource. -// -// - backendService: Name of the BackendService resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { - c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { - 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 *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, 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 := &BackendService{ - 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 RegionBackendServicesGetHealthCall struct { - s *Service - project string - region string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this regional -// BackendService. -// -// - backendService: Name of the BackendService resource for which to get -// health. -// - project: . -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { - c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetHealthCall) 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.resourcegroupreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getHealth" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, 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 := &BackendServiceGroupHealth{ - 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 RegionBackendServicesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) GetIamPolicy(project string, region string, resource string) *RegionBackendServicesGetIamPolicyCall { - c := &RegionBackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionBackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendServicesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetIamPolicyCall { - 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 *RegionBackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetIamPolicyCall) 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, "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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 RegionBackendServicesInsertCall struct { - s *Service - project string - region string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional BackendService resource in the specified project -// using the data included in the request. For more information, see Backend -// services overview. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { - c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendservice = backendservice - 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. 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 *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { - 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 *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesInsertCall) 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.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") - 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{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.insert" 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 *RegionBackendServicesInsertCall) 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 RegionBackendServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of regional BackendService resources available to -// the specified project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { - c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { - 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 *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListCall) 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, "projects/{project}/regions/{region}/backendServices") - 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{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, 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 := &BackendServiceList{ - 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 *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) 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 RegionBackendServicesListUsableCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves an aggregated list of all usable backend services in -// the specified project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. It must be a string that -// meets the requirements in RFC1035. -func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { - c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { - 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 *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListUsableCall) 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, "projects/{project}/regions/{region}/backendServices/listUsable") - 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{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceListUsable.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, 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 := &BackendServiceListUsable{ - 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 *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) 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 RegionBackendServicesPatchCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional BackendService resource with the data -// included in the request. For more information, see Understanding backend -// services This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. -// -// - backendService: Name of the BackendService resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - 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. 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 *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { - 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 *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesPatchCall) 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.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.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 *RegionBackendServicesPatchCall) 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 RegionBackendServicesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { - c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesSetIamPolicyCall) 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.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.setIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - 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 RegionBackendServicesSetSecurityPolicyCall struct { - s *Service - project string - region string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified backend service. For more information, see Google Cloud Armor -// Overview -// -// - backendService: Name of the BackendService resource to which the security -// policy should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { - c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - 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. 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 *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { - 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 *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesSetSecurityPolicyCall) 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.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.setSecurityPolicy" 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 *RegionBackendServicesSetSecurityPolicyCall) 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 RegionBackendServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { - c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesTestIamPermissionsCall) 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.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - 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 RegionBackendServicesUpdateCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified regional BackendService resource with the data -// included in the request. For more information, see Backend services overview -// . -// -// - backendService: Name of the BackendService resource to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - 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. 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 *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { - 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 *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesUpdateCall) 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.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.update" 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 *RegionBackendServicesUpdateCall) 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 RegionCommitmentsAggregatedListCall struct { s *Service project string @@ -7525,8 +5909,265 @@ func (r *RegionHealthChecksService) Update(project string, region string, health c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheck = healthCheck - c.healthcheck = healthcheck + c.healthCheck = healthCheck + c.healthcheck = healthcheck + 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. 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 *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { + 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 *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionHealthChecksUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthChecksUpdateCall) 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.healthcheck) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthChecks.update" 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 *RegionHealthChecksUpdateCall) 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 RegionInstanceGroupManagerResizeRequestsCancelCall struct { + s *Service + project string + region string + instanceGroupManager string + resizeRequest string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels the specified resize request. Cancelled resize request no +// longer waits for the resources to be provisioned. Cancel is only possible +// for requests that are in accepted state. +// +// - instanceGroupManager: The name of the managed instance group. Name should +// conform to RFC1035 or be a resource ID. +// - project: Project ID for this request. +// - region: The name of the region scoping this request. Name should conform +// to RFC1035. +// - resizeRequest: The name of the resize request to cancel. Name should +// conform to RFC1035 or be a resource ID. +func (r *RegionInstanceGroupManagerResizeRequestsService) Cancel(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsCancelCall { + c := &RegionInstanceGroupManagerResizeRequestsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.resizeRequest = resizeRequest + 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. 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 *RegionInstanceGroupManagerResizeRequestsCancelCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsCancelCall { + 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 *RegionInstanceGroupManagerResizeRequestsCancelCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) 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, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + "resizeRequest": c.resizeRequest, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagerResizeRequests.cancel" 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 *RegionInstanceGroupManagerResizeRequestsCancelCall) 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 RegionInstanceGroupManagerResizeRequestsDeleteCall struct { + s *Service + project string + region string + instanceGroupManager string + resizeRequest string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified, inactive resize request. Requests that are +// still active cannot be deleted. Deleting request does not delete instances +// that were provisioned previously. +// +// - instanceGroupManager: The name of the managed instance group. Name should +// conform to RFC1035 or be a resource ID. +// - project: Project ID for this request. +// - region: The name of the region scoping this request. Name should conform +// to RFC1035. +// - resizeRequest: The name of the resize request to delete. Name should +// conform to RFC1035 or be a resource ID. +func (r *RegionInstanceGroupManagerResizeRequestsService) Delete(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsDeleteCall { + c := &RegionInstanceGroupManagerResizeRequestsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.resizeRequest = resizeRequest return c } @@ -7540,7 +6181,7 @@ func (r *RegionHealthChecksService) Update(project string, region string, health // 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 *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { +func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -7548,56 +6189,53 @@ func (c *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealth // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { +func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { +func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthChecksUpdateCall) Header() http.Header { +func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) 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.healthcheck) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + "resizeRequest": c.resizeRequest, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.update" call. +// Do executes the "compute.regionInstanceGroupManagerResizeRequests.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 *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27124,7 +25762,236 @@ func (c *RegionUrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) e } } -type RegionUrlMapsPatchCall struct { +type RegionUrlMapsPatchCall struct { + s *Service + project string + region string + urlMap string + urlmap *UrlMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified UrlMap resource with the data included in the +// request. This method supports PATCH semantics and uses JSON merge patch +// format and processing rules. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - urlMap: Name of the UrlMap resource to patch. +func (r *RegionUrlMapsService) Patch(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsPatchCall { + c := &RegionUrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlMap = urlMap + c.urlmap = urlmap + return c +} + +// RequestId sets the optional parameter "requestId": begin_interface: +// MixerMutationRequestBuilder Request ID to support idempotency. +func (c *RegionUrlMapsPatchCall) RequestId(requestId string) *RegionUrlMapsPatchCall { + 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 *RegionUrlMapsPatchCall) Fields(s ...googleapi.Field) *RegionUrlMapsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionUrlMapsPatchCall) Context(ctx context.Context) *RegionUrlMapsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionUrlMapsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsPatchCall) 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.urlmap) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") + 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{ + "project": c.project, + "region": c.region, + "urlMap": c.urlMap, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.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 *RegionUrlMapsPatchCall) 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 RegionUrlMapsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionUrlMapsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionUrlMapsTestIamPermissionsCall { + c := &RegionUrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionUrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionUrlMapsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionUrlMapsTestIamPermissionsCall) Context(ctx context.Context) *RegionUrlMapsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionUrlMapsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsTestIamPermissionsCall) 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.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{resource}/testIamPermissions") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionUrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + 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 RegionUrlMapsUpdateCall struct { s *Service project string region string @@ -27135,15 +26002,14 @@ type RegionUrlMapsPatchCall struct { header_ http.Header } -// Patch: Patches the specified UrlMap resource with the data included in the -// request. This method supports PATCH semantics and uses JSON merge patch -// format and processing rules. +// Update: Updates the specified UrlMap resource with the data included in the +// request. // // - project: Project ID for this request. // - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to patch. -func (r *RegionUrlMapsService) Patch(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsPatchCall { - c := &RegionUrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - urlMap: Name of the UrlMap resource to update. +func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { + c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.urlMap = urlMap @@ -27153,7 +26019,7 @@ func (r *RegionUrlMapsService) Patch(project string, region string, urlMap strin // RequestId sets the optional parameter "requestId": begin_interface: // MixerMutationRequestBuilder Request ID to support idempotency. -func (c *RegionUrlMapsPatchCall) RequestId(requestId string) *RegionUrlMapsPatchCall { +func (c *RegionUrlMapsUpdateCall) RequestId(requestId string) *RegionUrlMapsUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -27161,27 +26027,27 @@ func (c *RegionUrlMapsPatchCall) RequestId(requestId string) *RegionUrlMapsPatch // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionUrlMapsPatchCall) Fields(s ...googleapi.Field) *RegionUrlMapsPatchCall { +func (c *RegionUrlMapsUpdateCall) Fields(s ...googleapi.Field) *RegionUrlMapsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsPatchCall) Context(ctx context.Context) *RegionUrlMapsPatchCall { +func (c *RegionUrlMapsUpdateCall) Context(ctx context.Context) *RegionUrlMapsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionUrlMapsPatchCall) Header() http.Header { +func (c *RegionUrlMapsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionUrlMapsUpdateCall) 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.urlmap) @@ -27192,7 +26058,7 @@ func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -27205,12 +26071,12 @@ func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionUrlMaps.patch" call. +// Do executes the "compute.regionUrlMaps.update" 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 *RegionUrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27242,65 +26108,66 @@ func (c *RegionUrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e return ret, nil } -type RegionUrlMapsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionUrlMapsValidateCall struct { + s *Service + project string + region string + urlMap string + regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// Validate: Runs static validation for the UrlMap. In particular, the tests of +// the provided UrlMap will be run. Calling this method does NOT create the +// UrlMap. // // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionUrlMapsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionUrlMapsTestIamPermissionsCall { - c := &RegionUrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +// - urlMap: Name of the UrlMap resource to be validated as. +func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { + c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.urlMap = urlMap + c.regionurlmapsvalidaterequest = regionurlmapsvalidaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionUrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionUrlMapsTestIamPermissionsCall { +func (c *RegionUrlMapsValidateCall) Fields(s ...googleapi.Field) *RegionUrlMapsValidateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsTestIamPermissionsCall) Context(ctx context.Context) *RegionUrlMapsTestIamPermissionsCall { +func (c *RegionUrlMapsValidateCall) Context(ctx context.Context) *RegionUrlMapsValidateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionUrlMapsTestIamPermissionsCall) Header() http.Header { +func (c *RegionUrlMapsValidateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionUrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionUrlMapsValidateCall) 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.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionurlmapsvalidaterequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27308,20 +26175,20 @@ func (c *RegionUrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "urlMap": c.urlMap, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionUrlMaps.testIamPermissions" call. +// Do executes the "compute.regionUrlMaps.validate" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionUrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27340,7 +26207,7 @@ func (c *RegionUrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &UrlMapsValidateResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27353,74 +26220,148 @@ func (c *RegionUrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type RegionUrlMapsUpdateCall struct { - s *Service - project string - region string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionZonesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified UrlMap resource with the data included in the -// request. +// List: Retrieves the list of Zone resources under the specific region +// available to the specified project. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to update. -func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { - c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Region for this request. +func (r *RegionZonesService) List(project string, region string) *RegionZonesListCall { + c := &RegionZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.urlMap = urlMap - c.urlmap = urlmap return c } -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder Request ID to support idempotency. -func (c *RegionUrlMapsUpdateCall) RequestId(requestId string) *RegionUrlMapsUpdateCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionZonesListCall) Filter(filter string) *RegionZonesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionZonesListCall) MaxResults(maxResults int64) *RegionZonesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionZonesListCall) OrderBy(orderBy string) *RegionZonesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionZonesListCall) PageToken(pageToken string) *RegionZonesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionZonesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionUrlMapsUpdateCall) Fields(s ...googleapi.Field) *RegionUrlMapsUpdateCall { +func (c *RegionZonesListCall) Fields(s ...googleapi.Field) *RegionZonesListCall { 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 *RegionZonesListCall) IfNoneMatch(entityTag string) *RegionZonesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsUpdateCall) Context(ctx context.Context) *RegionUrlMapsUpdateCall { +func (c *RegionZonesListCall) Context(ctx context.Context) *RegionZonesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionUrlMapsUpdateCall) Header() http.Header { +func (c *RegionZonesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionUrlMapsUpdateCall) 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.urlmap) - if err != nil { - return nil, err +func (c *RegionZonesListCall) 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, "projects/{project}/regions/{region}/urlMaps/{urlMap}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/zones") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -27428,17 +26369,16 @@ func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "urlMap": c.urlMap, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionUrlMaps.update" call. +// Do executes the "compute.regionZones.list" 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 +// *ZoneList.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27457,7 +26397,7 @@ func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ZoneList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27467,71 +26407,105 @@ func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + 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 *RegionZonesListCall) Pages(ctx context.Context, f func(*ZoneList) 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 RegionUrlMapsValidateCall struct { - s *Service - project string - region string - urlMap string - regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionsGetCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Validate: Runs static validation for the UrlMap. In particular, the tests of -// the provided UrlMap will be run. Calling this method does NOT create the -// UrlMap. +// Get: Returns the specified Region resource. To decrease latency for this +// method, you can optionally omit any unneeded information from the response +// by using a field mask. This practice is especially recommended for unused +// quota information (the `quotas` field). To exclude one or more fields, set +// your request's `fields` query parameter to only include the fields you need. +// For example, to only include the `id` and `selfLink` fields, add the query +// parameter `?fields=id,selfLink` to your request. This method fails if the +// quota information is unavailable for the region and if the organization +// policy constraint compute.requireBasicQuotaInResponse is enforced. This +// constraint, when enforced, disables the fail-open behaviour when quota +// information (the `items.quotas` field) is unavailable for the region. It is +// recommended to use the default setting for the constraint unless your +// application requires the fail-closed behaviour for this method. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to be validated as. -func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { - c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region resource to return. +func (r *RegionsService) Get(project string, region string) *RegionsGetCall { + c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.urlMap = urlMap - c.regionurlmapsvalidaterequest = regionurlmapsvalidaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionUrlMapsValidateCall) Fields(s ...googleapi.Field) *RegionUrlMapsValidateCall { +func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { 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 *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsValidateCall) Context(ctx context.Context) *RegionUrlMapsValidateCall { +func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionUrlMapsValidateCall) Header() http.Header { +func (c *RegionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionUrlMapsValidateCall) 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.regionurlmapsvalidaterequest) - if err != nil { - return nil, err +func (c *RegionsGetCall) 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, "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -27539,18 +26513,16 @@ func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "urlMap": c.urlMap, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionUrlMaps.validate" call. +// Do executes the "compute.regions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) { +// *Region.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27569,7 +26541,7 @@ func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsVa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &UrlMapsValidateResponse{ + ret := &Region{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27582,25 +26554,34 @@ func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsVa return ret, nil } -type RegionZonesListCall struct { +type RegionsListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of Zone resources under the specific region -// available to the specified project. +// List: Retrieves the list of region resources available to the specified +// project. To decrease latency for this method, you can optionally omit any +// unneeded information from the response by using a field mask. This practice +// is especially recommended for unused quota information (the `items.quotas` +// field). To exclude one or more fields, set your request's `fields` query +// parameter to only include the fields you need. For example, to only include +// the `id` and `selfLink` fields, add the query parameter +// `?fields=id,selfLink` to your request. This method fails if the quota +// information is unavailable for the region and if the organization policy +// constraint compute.requireBasicQuotaInResponse is enforced. This constraint, +// when enforced, disables the fail-open behaviour when quota information (the +// `items.quotas` field) is unavailable for the region. It is recommended to +// use the default setting for the constraint unless your application requires +// the fail-closed behaviour for this method. // // - project: Project ID for this request. -// - region: Region for this request. -func (r *RegionZonesService) List(project string, region string) *RegionZonesListCall { - c := &RegionZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionsService) List(project string) *RegionsListCall { + c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -27636,7 +26617,7 @@ func (r *RegionZonesService) List(project string, region string) *RegionZonesLis // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionZonesListCall) Filter(filter string) *RegionZonesListCall { +func (c *RegionsListCall) Filter(filter string) *RegionsListCall { c.urlParams_.Set("filter", filter) return c } @@ -27646,7 +26627,7 @@ func (c *RegionZonesListCall) Filter(filter string) *RegionZonesListCall { // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionZonesListCall) MaxResults(maxResults int64) *RegionZonesListCall { +func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -27659,7 +26640,7 @@ func (c *RegionZonesListCall) MaxResults(maxResults int64) *RegionZonesListCall // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionZonesListCall) OrderBy(orderBy string) *RegionZonesListCall { +func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -27667,7 +26648,7 @@ func (c *RegionZonesListCall) OrderBy(orderBy string) *RegionZonesListCall { // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionZonesListCall) PageToken(pageToken string) *RegionZonesListCall { +func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -27677,7 +26658,7 @@ func (c *RegionZonesListCall) PageToken(pageToken string) *RegionZonesListCall { // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionZonesListCall { +func (c *RegionsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -27685,7 +26666,7 @@ func (c *RegionZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *R // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionZonesListCall) Fields(s ...googleapi.Field) *RegionZonesListCall { +func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27693,27 +26674,27 @@ func (c *RegionZonesListCall) Fields(s ...googleapi.Field) *RegionZonesListCall // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionZonesListCall) IfNoneMatch(entityTag string) *RegionZonesListCall { +func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionZonesListCall) Context(ctx context.Context) *RegionZonesListCall { +func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionZonesListCall) Header() http.Header { +func (c *RegionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionZonesListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27721,7 +26702,7 @@ func (c *RegionZonesListCall) 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, "projects/{project}/regions/{region}/zones") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27730,17 +26711,16 @@ func (c *RegionZonesListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionZones.list" call. +// Do executes the "compute.regions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ZoneList.ServerResponse.Header or (if a response was returned at all) in +// *RegionList.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { +func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27759,7 +26739,7 @@ func (c *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ZoneList{ + ret := &RegionList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27775,7 +26755,7 @@ func (c *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error // 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 *RegionZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { +func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -27793,43 +26773,40 @@ func (c *RegionZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error } } -type RegionsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReservationBlocksGetCall struct { + s *Service + project string + zone string + reservation string + reservationBlock string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified Region resource. To decrease latency for this -// method, you can optionally omit any unneeded information from the response -// by using a field mask. This practice is especially recommended for unused -// quota information (the `quotas` field). To exclude one or more fields, set -// your request's `fields` query parameter to only include the fields you need. -// For example, to only include the `id` and `selfLink` fields, add the query -// parameter `?fields=id,selfLink` to your request. This method fails if the -// quota information is unavailable for the region and if the organization -// policy constraint compute.requireBasicQuotaInResponse is enforced. This -// constraint, when enforced, disables the fail-open behaviour when quota -// information (the `items.quotas` field) is unavailable for the region. It is -// recommended to use the default setting for the constraint unless your -// application requires the fail-closed behaviour for this method. +// Get: Retrieves information about the specified reservation block. // -// - project: Project ID for this request. -// - region: Name of the region resource to return. -func (r *RegionsService) Get(project string, region string) *RegionsGetCall { - c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - reservation: The name of the reservation. Name should conform to RFC1035 +// or be a resource ID. +// - reservationBlock: The name of the reservation block. Name should conform +// to RFC1035 or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationBlocksService) Get(project string, zone string, reservation string, reservationBlock string) *ReservationBlocksGetCall { + c := &ReservationBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region + c.zone = zone + c.reservation = reservation + c.reservationBlock = reservationBlock return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { +func (c *ReservationBlocksGetCall) Fields(s ...googleapi.Field) *ReservationBlocksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27837,27 +26814,27 @@ func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { +func (c *ReservationBlocksGetCall) IfNoneMatch(entityTag string) *ReservationBlocksGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { +func (c *ReservationBlocksGetCall) Context(ctx context.Context) *ReservationBlocksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsGetCall) Header() http.Header { +func (c *ReservationBlocksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationBlocksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27865,7 +26842,7 @@ func (c *RegionsGetCall) 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, "projects/{project}/regions/{region}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27873,18 +26850,21 @@ func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + "reservationBlock": c.reservationBlock, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regions.get" call. +// Do executes the "compute.reservationBlocks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Region.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { +// *ReservationBlocksGetResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksGetResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27903,7 +26883,7 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Region{ + ret := &ReservationBlocksGetResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27916,34 +26896,29 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { return ret, nil } -type RegionsListCall struct { +type ReservationBlocksListCall struct { s *Service project string + zone string + reservation string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of region resources available to the specified -// project. To decrease latency for this method, you can optionally omit any -// unneeded information from the response by using a field mask. This practice -// is especially recommended for unused quota information (the `items.quotas` -// field). To exclude one or more fields, set your request's `fields` query -// parameter to only include the fields you need. For example, to only include -// the `id` and `selfLink` fields, add the query parameter -// `?fields=id,selfLink` to your request. This method fails if the quota -// information is unavailable for the region and if the organization policy -// constraint compute.requireBasicQuotaInResponse is enforced. This constraint, -// when enforced, disables the fail-open behaviour when quota information (the -// `items.quotas` field) is unavailable for the region. It is recommended to -// use the default setting for the constraint unless your application requires -// the fail-closed behaviour for this method. +// List: Retrieves a list of reservation blocks under a single reservation. // -// - project: Project ID for this request. -func (r *RegionsService) List(project string) *RegionsListCall { - c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - reservation: The name of the reservation. Name should conform to RFC1035 +// or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationBlocksService) List(project string, zone string, reservation string) *ReservationBlocksListCall { + c := &ReservationBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone + c.reservation = reservation return c } @@ -27979,7 +26954,7 @@ func (r *RegionsService) List(project string) *RegionsListCall { // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionsListCall) Filter(filter string) *RegionsListCall { +func (c *ReservationBlocksListCall) Filter(filter string) *ReservationBlocksListCall { c.urlParams_.Set("filter", filter) return c } @@ -27989,7 +26964,7 @@ func (c *RegionsListCall) Filter(filter string) *RegionsListCall { // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { +func (c *ReservationBlocksListCall) MaxResults(maxResults int64) *ReservationBlocksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -28002,7 +26977,7 @@ func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { +func (c *ReservationBlocksListCall) OrderBy(orderBy string) *ReservationBlocksListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -28010,7 +26985,7 @@ func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { +func (c *ReservationBlocksListCall) PageToken(pageToken string) *ReservationBlocksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28020,7 +26995,7 @@ func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionsListCall { +func (c *ReservationBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationBlocksListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -28028,7 +27003,7 @@ func (c *RegionsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *Regio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { +func (c *ReservationBlocksListCall) Fields(s ...googleapi.Field) *ReservationBlocksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28036,27 +27011,27 @@ func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { +func (c *ReservationBlocksListCall) IfNoneMatch(entityTag string) *ReservationBlocksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { +func (c *ReservationBlocksListCall) Context(ctx context.Context) *ReservationBlocksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsListCall) Header() http.Header { +func (c *ReservationBlocksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationBlocksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28064,7 +27039,7 @@ func (c *RegionsListCall) 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, "projects/{project}/regions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28072,17 +27047,20 @@ func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regions.list" call. +// Do executes the "compute.reservationBlocks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionList.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) { +// *ReservationBlocksListResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28101,7 +27079,7 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionList{ + ret := &ReservationBlocksListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28117,7 +27095,7 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) // 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 *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { +func (c *ReservationBlocksListCall) Pages(ctx context.Context, f func(*ReservationBlocksListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 746d94c3022..3a9fbabaa36 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -5986,7 +5986,7 @@ } } }, - "revision": "20240826", + "revision": "20240829", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6181,17 +6181,19 @@ "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", - "CUSTOMER_POLICY_VIOLATION" + "CUSTOMER_POLICY_VIOLATION", + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", "The adversarial query ignored case.", - "The non-answer seeking query ignored case.", + "The non-answer seeking query ignored case Google skips the answer if the query is chit chat.", "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", - "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." ], "type": "string" }, @@ -6436,13 +6438,15 @@ "TYPE_UNSPECIFIED", "ADVERSARIAL_QUERY", "NON_ANSWER_SEEKING_QUERY", - "JAIL_BREAKING_QUERY" + "JAIL_BREAKING_QUERY", + "NON_ANSWER_SEEKING_QUERY_V2" ], "enumDescriptions": [ "Unspecified query classification type.", "Adversarial query classification type.", - "Non-answer-seeking query classification type.", - "Jail-breaking query classification type." + "Non-answer-seeking query classification type, for chit chat.", + "Jail-breaking query classification type.", + "Non-answer-seeking query classification type, for no clear intent." ], "type": "string" }, @@ -6725,13 +6729,15 @@ "TYPE_UNSPECIFIED", "ADVERSARIAL_QUERY", "NON_ANSWER_SEEKING_QUERY", - "JAIL_BREAKING_QUERY" + "JAIL_BREAKING_QUERY", + "NON_ANSWER_SEEKING_QUERY_V2" ], "enumDescriptions": [ "Unspecified query classification type.", "Adversarial query classification type.", - "Non-answer-seeking query classification type.", - "Jail-breaking query classification type." + "Non-answer-seeking query classification type, for chit chat.", + "Jail-breaking query classification type.", + "Non-answer-seeking query classification type, for no clear intent." ], "type": "string" } @@ -8392,6 +8398,11 @@ "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", "type": "string" }, + "indexStatus": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentIndexStatus", + "description": "Output only. The index status of the document. * If document is indexed successfully, the index_time field is populated. * Otherwise, if document is not indexed due to errors, the error_samples field is populated. * Otherwise, index_status is unset.", + "readOnly": true + }, "indexTime": { "description": "Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.", "format": "google-datetime", @@ -8445,6 +8456,25 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1DocumentIndexStatus": { + "description": "Index status of the document.", + "id": "GoogleCloudDiscoveryengineV1DocumentIndexStatus", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while indexing the document. If this field is populated, the document is not indexed due to errors.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "indexTime": { + "description": "The time when the document was indexed. If this field is populated, it means the document has been indexed.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1DocumentInfo": { "description": "Detailed document information associated with a user event.", "id": "GoogleCloudDiscoveryengineV1DocumentInfo", @@ -10781,18 +10811,20 @@ "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", - "CUSTOMER_POLICY_VIOLATION" + "CUSTOMER_POLICY_VIOLATION", + "NON_SUMMARY_SEEKING_QUERY_IGNORED_V2" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", "The adversarial query ignored case. Only used when SummarySpec.ignore_adversarial_query is set to `true`.", - "The non-summary seeking query ignored case. Only used when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", + "The non-summary seeking query ignored case. Google skips the summary if the query is chit chat. Only used when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B.", "The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", - "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", + "The non-answer seeking query ignored case. Google skips the summary if the query doesn't have clear intent. Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] is set to `true`." ], "type": "string" }, @@ -11510,15 +11542,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } @@ -11555,17 +11591,19 @@ "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", - "CUSTOMER_POLICY_VIOLATION" + "CUSTOMER_POLICY_VIOLATION", + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", "The adversarial query ignored case.", - "The non-answer seeking query ignored case.", + "The non-answer seeking query ignored case Google skips the answer if the query is chit chat.", "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", - "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." ], "type": "string" }, @@ -11705,13 +11743,15 @@ "TYPE_UNSPECIFIED", "ADVERSARIAL_QUERY", "NON_ANSWER_SEEKING_QUERY", - "JAIL_BREAKING_QUERY" + "JAIL_BREAKING_QUERY", + "NON_ANSWER_SEEKING_QUERY_V2" ], "enumDescriptions": [ "Unspecified query classification type.", "Adversarial query classification type.", - "Non-answer-seeking query classification type.", - "Jail-breaking query classification type." + "Non-answer-seeking query classification type, for chit chat.", + "Jail-breaking query classification type.", + "Non-answer-seeking query classification type, for no clear intent." ], "type": "string" } @@ -15119,15 +15159,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } @@ -17568,15 +17612,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 9103f527608..2076fc81c59 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -1151,7 +1151,7 @@ type GoogleCloudDiscoveryengineV1Answer struct { // reason is not specified. // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query ignored - // case. + // case Google skips the answer if the query is chit chat. // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. // Google skips the answer if there are no high-relevance search results. // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. Google @@ -1165,6 +1165,9 @@ type GoogleCloudDiscoveryengineV1Answer struct { // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google // skips the summary if there is a customer policy violation detected. The // policy is defined by the customer. + // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query + // ignored case. Google skips the answer if the query doesn't have clear + // intent. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -1463,8 +1466,11 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryCl // Possible values: // "TYPE_UNSPECIFIED" - Unspecified query classification type. // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type, + // for chit chat. // "JAIL_BREAKING_QUERY" - Jail-breaking query classification type. + // "NON_ANSWER_SEEKING_QUERY_V2" - Non-answer-seeking query classification + // type, for no clear intent. Types []string `json:"types,omitempty"` // ForceSendFields is a list of field names (e.g. "Types") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -1894,8 +1900,11 @@ type GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfoQueryClassification // Possible values: // "TYPE_UNSPECIFIED" - Unspecified query classification type. // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type, + // for chit chat. // "JAIL_BREAKING_QUERY" - Jail-breaking query classification type. + // "NON_ANSWER_SEEKING_QUERY_V2" - Non-answer-seeking query classification + // type, for no clear intent. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with empty or @@ -4178,6 +4187,11 @@ type GoogleCloudDiscoveryengineV1Document struct { // (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 // characters. Id string `json:"id,omitempty"` + // IndexStatus: Output only. The index status of the document. * If document is + // indexed successfully, the index_time field is populated. * Otherwise, if + // document is not indexed due to errors, the error_samples field is populated. + // * Otherwise, index_status is unset. + IndexStatus *GoogleCloudDiscoveryengineV1DocumentIndexStatus `json:"indexStatus,omitempty"` // IndexTime: Output only. The last time the document was indexed. If this // field is set, the document could be returned in search results. This field // is OUTPUT_ONLY. If this field is not populated, it means the document has @@ -4262,6 +4276,33 @@ func (s GoogleCloudDiscoveryengineV1DocumentContent) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1DocumentIndexStatus: Index status of the +// document. +type GoogleCloudDiscoveryengineV1DocumentIndexStatus struct { + // ErrorSamples: A sample of errors encountered while indexing the document. If + // this field is populated, the document is not indexed due to errors. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // IndexTime: The time when the document was indexed. If this field is + // populated, it means the document has been indexed. + IndexTime string `json:"indexTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ErrorSamples") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1DocumentIndexStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1DocumentIndexStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1DocumentInfo: Detailed document information // associated with a user event. type GoogleCloudDiscoveryengineV1DocumentInfo struct { @@ -7819,8 +7860,8 @@ type GoogleCloudDiscoveryengineV1SearchResponseSummary struct { // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. Only // used when SummarySpec.ignore_adversarial_query is set to `true`. // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query - // ignored case. Only used when SummarySpec.ignore_non_summary_seeking_query is - // set to `true`. + // ignored case. Google skips the summary if the query is chit chat. Only used + // when SummarySpec.ignore_non_summary_seeking_query is set to `true`. // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. // Google skips the summary if there are no high-relevance search results. For // example, the data store contains facts about company A but the user query is @@ -7839,6 +7880,11 @@ type GoogleCloudDiscoveryengineV1SearchResponseSummary struct { // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google // skips the summary if there is a customer policy violation detected. The // policy is defined by the customer. + // "NON_SUMMARY_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query + // ignored case. Google skips the summary if the query doesn't have clear + // intent. Only used when + // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] + // is set to `true`. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -8864,16 +8910,14 @@ type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or @@ -8929,7 +8973,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // reason is not specified. // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query ignored - // case. + // case Google skips the answer if the query is chit chat. // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. // Google skips the answer if there are no high-relevance search results. // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. Google @@ -8943,6 +8987,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google // skips the summary if there is a customer policy violation detected. The // policy is defined by the customer. + // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query + // ignored case. Google skips the answer if the query doesn't have clear + // intent. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -9073,8 +9120,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassific // Possible values: // "TYPE_UNSPECIFIED" - Unspecified query classification type. // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type, + // for chit chat. // "JAIL_BREAKING_QUERY" - Jail-breaking query classification type. + // "NON_ANSWER_SEEKING_QUERY_V2" - Non-answer-seeking query classification + // type, for no clear intent. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with empty or @@ -13855,16 +13905,14 @@ type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or @@ -17375,16 +17423,14 @@ type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 2271249c94f..6ddbdf7cb09 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -7517,7 +7517,7 @@ } } }, - "revision": "20240826", + "revision": "20240829", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -9293,15 +9293,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } @@ -9369,17 +9373,19 @@ "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", - "CUSTOMER_POLICY_VIOLATION" + "CUSTOMER_POLICY_VIOLATION", + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", "The adversarial query ignored case.", - "The non-answer seeking query ignored case.", + "The non-answer seeking query ignored case Google skips the answer if the query is chit chat.", "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", - "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." ], "type": "string" }, @@ -9624,13 +9630,15 @@ "TYPE_UNSPECIFIED", "ADVERSARIAL_QUERY", "NON_ANSWER_SEEKING_QUERY", - "JAIL_BREAKING_QUERY" + "JAIL_BREAKING_QUERY", + "NON_ANSWER_SEEKING_QUERY_V2" ], "enumDescriptions": [ "Unspecified query classification type.", "Adversarial query classification type.", - "Non-answer-seeking query classification type.", - "Jail-breaking query classification type." + "Non-answer-seeking query classification type, for chit chat.", + "Jail-breaking query classification type.", + "Non-answer-seeking query classification type, for no clear intent." ], "type": "string" }, @@ -9917,13 +9925,15 @@ "TYPE_UNSPECIFIED", "ADVERSARIAL_QUERY", "NON_ANSWER_SEEKING_QUERY", - "JAIL_BREAKING_QUERY" + "JAIL_BREAKING_QUERY", + "NON_ANSWER_SEEKING_QUERY_V2" ], "enumDescriptions": [ "Unspecified query classification type.", "Adversarial query classification type.", - "Non-answer-seeking query classification type.", - "Jail-breaking query classification type." + "Non-answer-seeking query classification type, for chit chat.", + "Jail-breaking query classification type.", + "Non-answer-seeking query classification type, for no clear intent." ], "type": "string" } @@ -11714,6 +11724,11 @@ "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", "type": "string" }, + "indexStatus": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus", + "description": "Output only. The index status of the document. * If document is indexed successfully, the index_time field is populated. * Otherwise, if document is not indexed due to errors, the error_samples field is populated. * Otherwise, index_status is unset.", + "readOnly": true + }, "indexTime": { "description": "Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.", "format": "google-datetime", @@ -11799,6 +11814,25 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus": { + "description": "Index status of the document.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while indexing the document. If this field is populated, the document is not indexed due to errors.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "indexTime": { + "description": "The time when the document was indexed. If this field is populated, it means the document has been indexed.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDocumentInfo": { "description": "Detailed document information associated with a user event.", "id": "GoogleCloudDiscoveryengineV1alphaDocumentInfo", @@ -15906,18 +15940,20 @@ "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", - "CUSTOMER_POLICY_VIOLATION" + "CUSTOMER_POLICY_VIOLATION", + "NON_SUMMARY_SEEKING_QUERY_IGNORED_V2" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", "The adversarial query ignored case. Only used when SummarySpec.ignore_adversarial_query is set to `true`.", - "The non-summary seeking query ignored case. Only used when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", + "The non-summary seeking query ignored case. Google skips the summary if the query is chit chat. Only used when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B.", "The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", - "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", + "The non-answer seeking query ignored case. Google skips the summary if the query doesn't have clear intent. Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] is set to `true`." ], "type": "string" }, @@ -16881,15 +16917,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } @@ -19330,15 +19370,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 77e6248c2a6..5b4f2ce1ace 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -3535,16 +3535,14 @@ type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or @@ -3646,7 +3644,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // reason is not specified. // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query ignored - // case. + // case Google skips the answer if the query is chit chat. // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. // Google skips the answer if there are no high-relevance search results. // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. Google @@ -3660,6 +3658,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google // skips the summary if there is a customer policy violation detected. The // policy is defined by the customer. + // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query + // ignored case. Google skips the answer if the query doesn't have clear + // intent. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -3958,8 +3959,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQu // Possible values: // "TYPE_UNSPECIFIED" - Unspecified query classification type. // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type, + // for chit chat. // "JAIL_BREAKING_QUERY" - Jail-breaking query classification type. + // "NON_ANSWER_SEEKING_QUERY_V2" - Non-answer-seeking query classification + // type, for no clear intent. Types []string `json:"types,omitempty"` // ForceSendFields is a list of field names (e.g. "Types") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -4393,8 +4397,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassific // Possible values: // "TYPE_UNSPECIFIED" - Unspecified query classification type. // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type, + // for chit chat. // "JAIL_BREAKING_QUERY" - Jail-breaking query classification type. + // "NON_ANSWER_SEEKING_QUERY_V2" - Non-answer-seeking query classification + // type, for no clear intent. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with empty or @@ -6846,6 +6853,11 @@ type GoogleCloudDiscoveryengineV1alphaDocument struct { // (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 // characters. Id string `json:"id,omitempty"` + // IndexStatus: Output only. The index status of the document. * If document is + // indexed successfully, the index_time field is populated. * Otherwise, if + // document is not indexed due to errors, the error_samples field is populated. + // * Otherwise, index_status is unset. + IndexStatus *GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus `json:"indexStatus,omitempty"` // IndexTime: Output only. The last time the document was indexed. If this // field is set, the document could be returned in search results. This field // is OUTPUT_ONLY. If this field is not populated, it means the document has @@ -6987,6 +6999,33 @@ func (s GoogleCloudDiscoveryengineV1alphaDocumentContent) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus: Index status of the +// document. +type GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus struct { + // ErrorSamples: A sample of errors encountered while indexing the document. If + // this field is populated, the document is not indexed due to errors. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // IndexTime: The time when the document was indexed. If this field is + // populated, it means the document has been indexed. + IndexTime string `json:"indexTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ErrorSamples") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDocumentInfo: Detailed document information // associated with a user event. type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { @@ -13068,8 +13107,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. Only // used when SummarySpec.ignore_adversarial_query is set to `true`. // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query - // ignored case. Only used when SummarySpec.ignore_non_summary_seeking_query is - // set to `true`. + // ignored case. Google skips the summary if the query is chit chat. Only used + // when SummarySpec.ignore_non_summary_seeking_query is set to `true`. // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. // Google skips the summary if there are no high-relevance search results. For // example, the data store contains facts about company A but the user query is @@ -13088,6 +13127,11 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google // skips the summary if there is a customer policy violation detected. The // policy is defined by the customer. + // "NON_SUMMARY_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query + // ignored case. Google skips the summary if the query doesn't have clear + // intent. Only used when + // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] + // is set to `true`. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -14439,16 +14483,14 @@ type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or @@ -17959,16 +18001,14 @@ type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 1110c350277..3cac54c9e17 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -6786,7 +6786,7 @@ } } }, - "revision": "20240826", + "revision": "20240829", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -8376,15 +8376,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } @@ -8421,17 +8425,19 @@ "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", - "CUSTOMER_POLICY_VIOLATION" + "CUSTOMER_POLICY_VIOLATION", + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", "The adversarial query ignored case.", - "The non-answer seeking query ignored case.", + "The non-answer seeking query ignored case Google skips the answer if the query is chit chat.", "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", - "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." ], "type": "string" }, @@ -8571,13 +8577,15 @@ "TYPE_UNSPECIFIED", "ADVERSARIAL_QUERY", "NON_ANSWER_SEEKING_QUERY", - "JAIL_BREAKING_QUERY" + "JAIL_BREAKING_QUERY", + "NON_ANSWER_SEEKING_QUERY_V2" ], "enumDescriptions": [ "Unspecified query classification type.", "Adversarial query classification type.", - "Non-answer-seeking query classification type.", - "Jail-breaking query classification type." + "Non-answer-seeking query classification type, for chit chat.", + "Jail-breaking query classification type.", + "Non-answer-seeking query classification type, for no clear intent." ], "type": "string" } @@ -11985,15 +11993,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } @@ -12046,17 +12058,19 @@ "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", - "CUSTOMER_POLICY_VIOLATION" + "CUSTOMER_POLICY_VIOLATION", + "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", "The adversarial query ignored case.", - "The non-answer seeking query ignored case.", + "The non-answer seeking query ignored case Google skips the answer if the query is chit chat.", "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", - "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", + "The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent." ], "type": "string" }, @@ -12301,13 +12315,15 @@ "TYPE_UNSPECIFIED", "ADVERSARIAL_QUERY", "NON_ANSWER_SEEKING_QUERY", - "JAIL_BREAKING_QUERY" + "JAIL_BREAKING_QUERY", + "NON_ANSWER_SEEKING_QUERY_V2" ], "enumDescriptions": [ "Unspecified query classification type.", "Adversarial query classification type.", - "Non-answer-seeking query classification type.", - "Jail-breaking query classification type." + "Non-answer-seeking query classification type, for chit chat.", + "Jail-breaking query classification type.", + "Non-answer-seeking query classification type, for no clear intent." ], "type": "string" }, @@ -12590,13 +12606,15 @@ "TYPE_UNSPECIFIED", "ADVERSARIAL_QUERY", "NON_ANSWER_SEEKING_QUERY", - "JAIL_BREAKING_QUERY" + "JAIL_BREAKING_QUERY", + "NON_ANSWER_SEEKING_QUERY_V2" ], "enumDescriptions": [ "Unspecified query classification type.", "Adversarial query classification type.", - "Non-answer-seeking query classification type.", - "Jail-breaking query classification type." + "Non-answer-seeking query classification type, for chit chat.", + "Jail-breaking query classification type.", + "Non-answer-seeking query classification type, for no clear intent." ], "type": "string" } @@ -14274,6 +14292,11 @@ "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", "type": "string" }, + "indexStatus": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentIndexStatus", + "description": "Output only. The index status of the document. * If document is indexed successfully, the index_time field is populated. * Otherwise, if document is not indexed due to errors, the error_samples field is populated. * Otherwise, index_status is unset.", + "readOnly": true + }, "indexTime": { "description": "Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.", "format": "google-datetime", @@ -14327,6 +14350,25 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaDocumentIndexStatus": { + "description": "Index status of the document.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentIndexStatus", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while indexing the document. If this field is populated, the document is not indexed due to errors.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "indexTime": { + "description": "The time when the document was indexed. If this field is populated, it means the document has been indexed.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaDocumentInfo": { "description": "Detailed document information associated with a user event.", "id": "GoogleCloudDiscoveryengineV1betaDocumentInfo", @@ -17613,18 +17655,20 @@ "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", "JAIL_BREAKING_QUERY_IGNORED", - "CUSTOMER_POLICY_VIOLATION" + "CUSTOMER_POLICY_VIOLATION", + "NON_SUMMARY_SEEKING_QUERY_IGNORED_V2" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", "The adversarial query ignored case. Only used when SummarySpec.ignore_adversarial_query is set to `true`.", - "The non-summary seeking query ignored case. Only used when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", + "The non-summary seeking query ignored case. Google skips the summary if the query is chit chat. Only used when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B.", "The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", - "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer.", + "The non-answer seeking query ignored case. Google skips the summary if the query doesn't have clear intent. Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] is set to `true`." ], "type": "string" }, @@ -18527,15 +18571,19 @@ "GOOGLE_MAIL", "GOOGLE_SITES", "GOOGLE_CALENDAR", - "GOOGLE_GROUPS" + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP" ], "enumDescriptions": [ - "Default value.", - "The data store is used to store content from Google Drive.", - "The data store is used to store content from Gmail.", - "The data store is used to store content from Google Sites.", - "The data store is used to store content from Google Calendar.", - "The data store is used to store content from Google Groups." + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data" ], "type": "string" } diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 5c3ae1b26fa..8d0283b2013 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -3062,16 +3062,14 @@ type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or @@ -3127,7 +3125,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // reason is not specified. // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query ignored - // case. + // case Google skips the answer if the query is chit chat. // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. // Google skips the answer if there are no high-relevance search results. // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. Google @@ -3141,6 +3139,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google // skips the summary if there is a customer policy violation detected. The // policy is defined by the customer. + // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query + // ignored case. Google skips the answer if the query doesn't have clear + // intent. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -3271,8 +3272,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassific // Possible values: // "TYPE_UNSPECIFIED" - Unspecified query classification type. // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type, + // for chit chat. // "JAIL_BREAKING_QUERY" - Jail-breaking query classification type. + // "NON_ANSWER_SEEKING_QUERY_V2" - Non-answer-seeking query classification + // type, for no clear intent. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with empty or @@ -8053,16 +8057,14 @@ type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or @@ -8135,7 +8137,7 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { // reason is not specified. // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query ignored - // case. + // case Google skips the answer if the query is chit chat. // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. // Google skips the answer if there are no high-relevance search results. // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. Google @@ -8149,6 +8151,9 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google // skips the summary if there is a customer policy violation detected. The // policy is defined by the customer. + // "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query + // ignored case. Google skips the answer if the query doesn't have clear + // intent. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -8446,8 +8451,11 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQue // Possible values: // "TYPE_UNSPECIFIED" - Unspecified query classification type. // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type, + // for chit chat. // "JAIL_BREAKING_QUERY" - Jail-breaking query classification type. + // "NON_ANSWER_SEEKING_QUERY_V2" - Non-answer-seeking query classification + // type, for no clear intent. Types []string `json:"types,omitempty"` // ForceSendFields is a list of field names (e.g. "Types") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -8880,8 +8888,11 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassifica // Possible values: // "TYPE_UNSPECIFIED" - Unspecified query classification type. // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type, + // for chit chat. // "JAIL_BREAKING_QUERY" - Jail-breaking query classification type. + // "NON_ANSWER_SEEKING_QUERY_V2" - Non-answer-seeking query classification + // type, for no clear intent. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with empty or @@ -11174,6 +11185,11 @@ type GoogleCloudDiscoveryengineV1betaDocument struct { // (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 // characters. Id string `json:"id,omitempty"` + // IndexStatus: Output only. The index status of the document. * If document is + // indexed successfully, the index_time field is populated. * Otherwise, if + // document is not indexed due to errors, the error_samples field is populated. + // * Otherwise, index_status is unset. + IndexStatus *GoogleCloudDiscoveryengineV1betaDocumentIndexStatus `json:"indexStatus,omitempty"` // IndexTime: Output only. The last time the document was indexed. If this // field is set, the document could be returned in search results. This field // is OUTPUT_ONLY. If this field is not populated, it means the document has @@ -11258,6 +11274,33 @@ func (s GoogleCloudDiscoveryengineV1betaDocumentContent) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaDocumentIndexStatus: Index status of the +// document. +type GoogleCloudDiscoveryengineV1betaDocumentIndexStatus struct { + // ErrorSamples: A sample of errors encountered while indexing the document. If + // this field is populated, the document is not indexed due to errors. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // IndexTime: The time when the document was indexed. If this field is + // populated, it means the document has been indexed. + IndexTime string `json:"indexTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ErrorSamples") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaDocumentIndexStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentIndexStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaDocumentInfo: Detailed document information // associated with a user event. type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { @@ -16203,8 +16246,8 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. Only // used when SummarySpec.ignore_adversarial_query is set to `true`. // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query - // ignored case. Only used when SummarySpec.ignore_non_summary_seeking_query is - // set to `true`. + // ignored case. Google skips the summary if the query is chit chat. Only used + // when SummarySpec.ignore_non_summary_seeking_query is set to `true`. // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. // Google skips the summary if there are no high-relevance search results. For // example, the data store contains facts about company A but the user query is @@ -16223,6 +16266,11 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google // skips the summary if there is a customer policy violation detected. The // policy is defined by the customer. + // "NON_SUMMARY_SEEKING_QUERY_IGNORED_V2" - The non-answer seeking query + // ignored case. Google skips the summary if the query doesn't have clear + // intent. Only used when + // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] + // is set to `true`. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -17501,16 +17549,14 @@ type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { // Type: The Google Workspace data source. // // Possible values: - // "TYPE_UNSPECIFIED" - Default value. - // "GOOGLE_DRIVE" - The data store is used to store content from Google - // Drive. - // "GOOGLE_MAIL" - The data store is used to store content from Gmail. - // "GOOGLE_SITES" - The data store is used to store content from Google - // Sites. - // "GOOGLE_CALENDAR" - The data store is used to store content from Google - // Calendar. - // "GOOGLE_GROUPS" - The data store is used to store content from Google - // Groups. + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to // unconditionally include in API requests. By default, fields with empty or diff --git a/file/v1beta1/file-api.json b/file/v1beta1/file-api.json index 1beeeb63c73..8c4f831ff90 100644 --- a/file/v1beta1/file-api.json +++ b/file/v1beta1/file-api.json @@ -502,7 +502,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * \"description\" * \"directory_services\" * \"file_shares\" * \"labels\"", + "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * \"description\" * \"directory_services\" * \"file_shares\" * \"labels\" * \"performance_config\" * \"deletion_protection_enabled\" * \"deletion_protection_reason\"", "format": "google-fieldmask", "location": "query", "type": "string" @@ -520,7 +520,7 @@ ] }, "promoteReplica": { - "description": "Promote an standby instance (replica).", + "description": "Promote the standby instance (replica).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:promoteReplica", "httpMethod": "POST", "id": "file.projects.locations.instances.promoteReplica", @@ -1069,7 +1069,7 @@ } } }, - "revision": "20240716", + "revision": "20240821", "rootUrl": "https://file.googleapis.com/", "schemas": { "Backup": { @@ -1205,7 +1205,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"", + "description": "Optional. Input only. Immutable. Tag key-value pairs are bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"", "type": "object" } }, @@ -1614,6 +1614,14 @@ "readOnly": true, "type": "string" }, + "deletionProtectionEnabled": { + "description": "Optional. Indicates whether the instance is protected against deletion.", + "type": "boolean" + }, + "deletionProtectionReason": { + "description": "Optional. The reason for enabling deletion protection.", + "type": "string" + }, "description": { "description": "The description of the instance (2048 characters or less).", "type": "string" @@ -1687,7 +1695,7 @@ }, "replication": { "$ref": "Replication", - "description": "Optional. Replicaition configuration." + "description": "Optional. Replication configuration." }, "satisfiesPzi": { "description": "Output only. Reserved for future use.", @@ -1757,7 +1765,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"", + "description": "Optional. Input only. Immutable. Tag key-value pairs are bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"", "type": "object" }, "tier": { @@ -2018,11 +2026,11 @@ "type": "object" }, "ManagedActiveDirectoryConfig": { - "description": "ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Active Directory.", + "description": "ManagedActiveDirectoryConfig contains all the parameters for connecting to Managed Service for Microsoft Active Directory (Managed Microsoft AD).", "id": "ManagedActiveDirectoryConfig", "properties": { "computer": { - "description": "Required. The computer name is used as a prefix to the mount remote target. Example: if the computer is `my-computer`, the mount command will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `.", + "description": "Required. The computer name is used as a prefix in the command to mount the remote target. For example: if the computer is `my-computer`, the mount command will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `.", "type": "string" }, "domain": { @@ -2296,7 +2304,7 @@ "id": "Replication", "properties": { "replicas": { - "description": "Replicas configuration on the instance. For now, only a single replica config is supported.", + "description": "Replication configuration for the replica instance associated with this instance. Only a single replica is supported.", "items": { "$ref": "ReplicaConfig" }, @@ -2311,8 +2319,8 @@ ], "enumDescriptions": [ "Role not set.", - "The instance is a Active replication member, functions as the replication source instance.", - "The instance is a Standby replication member, functions as the replication destination instance." + "The instance is the `ACTIVE` replication member, functions as the replication source instance.", + "The instance is the `STANDBY` replication member, functions as the replication destination instance." ], "type": "string" } @@ -2509,7 +2517,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"", + "description": "Optional. Input only. Immutable. Tag key-value pairs are bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"", "type": "object" } }, diff --git a/file/v1beta1/file-gen.go b/file/v1beta1/file-gen.go index df3960857b9..6ae24bd9ab4 100644 --- a/file/v1beta1/file-gen.go +++ b/file/v1beta1/file-gen.go @@ -315,9 +315,9 @@ type Backup struct { // backups share storage, this number is expected to change with backup // creation/deletion. StorageBytes int64 `json:"storageBytes,omitempty,string"` - // Tags: Optional. Input only. Immutable. Tag keys/values directly bound to - // this resource. For example: "123/environment": "production", - // "123/costCenter": "marketing" + // Tags: Optional. Input only. Immutable. Tag key-value pairs are bound to this + // resource. For example: "123/environment": "production", "123/costCenter": + // "marketing" Tags map[string]string `json:"tags,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -897,6 +897,12 @@ type Instance struct { CapacityStepSizeGb int64 `json:"capacityStepSizeGb,omitempty,string"` // CreateTime: Output only. The time when the instance was created. CreateTime string `json:"createTime,omitempty"` + // DeletionProtectionEnabled: Optional. Indicates whether the instance is + // protected against deletion. + DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"` + // DeletionProtectionReason: Optional. The reason for enabling deletion + // protection. + DeletionProtectionReason string `json:"deletionProtectionReason,omitempty"` // Description: The description of the instance (2048 characters or less). Description string `json:"description,omitempty"` // DirectoryServices: Optional. Directory Services configuration for @@ -937,7 +943,7 @@ type Instance struct { // "NFS_V3" - NFS 3.0. // "NFS_V4_1" - NFS 4.1. Protocol string `json:"protocol,omitempty"` - // Replication: Optional. Replicaition configuration. + // Replication: Optional. Replication configuration. Replication *Replication `json:"replication,omitempty"` // SatisfiesPzi: Output only. Reserved for future use. SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` @@ -975,9 +981,9 @@ type Instance struct { // "KMS_KEY_ISSUE" - The KMS key used by the instance is either revoked or // denied access to. SuspensionReasons []string `json:"suspensionReasons,omitempty"` - // Tags: Optional. Input only. Immutable. Tag keys/values directly bound to - // this resource. For example: "123/environment": "production", - // "123/costCenter": "marketing" + // Tags: Optional. Input only. Immutable. Tag key-value pairs are bound to this + // resource. For example: "123/environment": "production", "123/costCenter": + // "marketing" Tags map[string]string `json:"tags,omitempty"` // Tier: The service tier of the instance. // @@ -1317,11 +1323,13 @@ func (s MaintenanceWindow) MarshalJSON() ([]byte, error) { } // ManagedActiveDirectoryConfig: ManagedActiveDirectoryConfig contains all the -// parameters for connecting to Managed Active Directory. +// parameters for connecting to Managed Service for Microsoft Active Directory +// (Managed Microsoft AD). type ManagedActiveDirectoryConfig struct { - // Computer: Required. The computer name is used as a prefix to the mount - // remote target. Example: if the computer is `my-computer`, the mount command - // will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `. + // Computer: Required. The computer name is used as a prefix in the command to + // mount the remote target. For example: if the computer is `my-computer`, the + // mount command will look like: `$mount -o vers=4.1,sec=krb5 + // my-computer.filestore.: `. Computer string `json:"computer,omitempty"` // Domain: Required. The domain resource name, in the format // `projects/{project_id}/locations/global/domains/{domain}`. @@ -1607,17 +1615,17 @@ func (s ReplicaConfig) MarshalJSON() ([]byte, error) { // Replication: Replication specifications. type Replication struct { - // Replicas: Replicas configuration on the instance. For now, only a single - // replica config is supported. + // Replicas: Replication configuration for the replica instance associated with + // this instance. Only a single replica is supported. Replicas []*ReplicaConfig `json:"replicas,omitempty"` // Role: Output only. The replication role. // // Possible values: // "ROLE_UNSPECIFIED" - Role not set. - // "ACTIVE" - The instance is a Active replication member, functions as the - // replication source instance. - // "STANDBY" - The instance is a Standby replication member, functions as the - // replication destination instance. + // "ACTIVE" - The instance is the `ACTIVE` replication member, functions as + // the replication source instance. + // "STANDBY" - The instance is the `STANDBY` replication member, functions as + // the replication destination instance. Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Replicas") to // unconditionally include in API requests. By default, fields with empty or @@ -1810,9 +1818,9 @@ type Snapshot struct { // "READY" - Snapshot is available for use. // "DELETING" - Snapshot is being deleted. State string `json:"state,omitempty"` - // Tags: Optional. Input only. Immutable. Tag keys/values directly bound to - // this resource. For example: "123/environment": "production", - // "123/costCenter": "marketing" + // Tags: Optional. Input only. Immutable. Tag key-value pairs are bound to this + // resource. For example: "123/environment": "production", "123/costCenter": + // "marketing" Tags map[string]string `json:"tags,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -3336,7 +3344,9 @@ func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instanc // UpdateMask sets the optional parameter "updateMask": Required. Mask of // fields to update. At least one path must be supplied in this field. The // elements of the repeated paths field may only include these fields: * -// "description" * "directory_services" * "file_shares" * "labels" +// "description" * "directory_services" * "file_shares" * "labels" * +// "performance_config" * "deletion_protection_enabled" * +// "deletion_protection_reason" func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -3433,7 +3443,7 @@ type ProjectsLocationsInstancesPromoteReplicaCall struct { header_ http.Header } -// PromoteReplica: Promote an standby instance (replica). +// PromoteReplica: Promote the standby instance (replica). // // - name: The resource name of the instance, in the format // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 2cd463a3edf..1f27f80e36c 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240821", + "revision": "20240902", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -1096,14 +1096,16 @@ "BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", - "BLOCK_NONE" + "BLOCK_NONE", + "OFF" ], "enumDescriptions": [ "Unspecified harm block threshold.", "Block low threshold and above (i.e. block more).", "Block medium threshold and above.", "Block only high threshold (i.e. block less).", - "Block none." + "Block none.", + "Turn off the safety filter." ], "type": "string" } diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index b00236e16c4..cb40b58b281 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -1302,6 +1302,7 @@ type GoogleCloudAiplatformV1beta1SafetySetting struct { // "BLOCK_MEDIUM_AND_ABOVE" - Block medium threshold and above. // "BLOCK_ONLY_HIGH" - Block only high threshold (i.e. block less). // "BLOCK_NONE" - Block none. + // "OFF" - Turn off the safety filter. Threshold string `json:"threshold,omitempty"` // ForceSendFields is a list of field names (e.g. "Category") to // unconditionally include in API requests. By default, fields with empty or diff --git a/osconfig/v1alpha/osconfig-api.json b/osconfig/v1alpha/osconfig-api.json index 9016008825e..0e74ff521a2 100644 --- a/osconfig/v1alpha/osconfig-api.json +++ b/osconfig/v1alpha/osconfig-api.json @@ -707,7 +707,7 @@ } } }, - "revision": "20240610", + "revision": "20240901", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "CVSSv3": { @@ -1141,7 +1141,7 @@ "AVAILABLE_PACKAGE" ], "enumDescriptions": [ - "Invalid. An type must be specified.", + "Invalid. A type must be specified.", "This represents a package that is installed on the VM.", "This represents an update that is available for a package." ], diff --git a/osconfig/v1alpha/osconfig-gen.go b/osconfig/v1alpha/osconfig-gen.go index d0aff00a306..dcb77148942 100644 --- a/osconfig/v1alpha/osconfig-gen.go +++ b/osconfig/v1alpha/osconfig-gen.go @@ -721,7 +721,7 @@ type InventoryItem struct { // Type: The specific type of inventory, correlating to its specific details. // // Possible values: - // "TYPE_UNSPECIFIED" - Invalid. An type must be specified. + // "TYPE_UNSPECIFIED" - Invalid. A type must be specified. // "INSTALLED_PACKAGE" - This represents a package that is installed on the // VM. // "AVAILABLE_PACKAGE" - This represents an update that is available for a diff --git a/vision/v1/vision-api.json b/vision/v1/vision-api.json index 59618b9cf36..095c9726f9f 100644 --- a/vision/v1/vision-api.json +++ b/vision/v1/vision-api.json @@ -1282,7 +1282,7 @@ } } }, - "revision": "20231219", + "revision": "20240823", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AddProductToProductSetRequest": { @@ -2748,7 +2748,7 @@ "type": "object" }, "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark", "properties": { "position": { @@ -4162,7 +4162,7 @@ "type": "object" }, "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark", "properties": { "position": { @@ -5611,7 +5611,7 @@ "type": "object" }, "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark", "properties": { "position": { @@ -7154,7 +7154,7 @@ "type": "object" }, "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark", "properties": { "position": { @@ -8322,7 +8322,7 @@ "type": "object" }, "Landmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "Landmark", "properties": { "position": { diff --git a/vision/v1/vision-gen.go b/vision/v1/vision-gen.go index e1444e191ff..bd095933334 100644 --- a/vision/v1/vision-gen.go +++ b/vision/v1/vision-gen.go @@ -2240,7 +2240,9 @@ func (s *GoogleCloudVisionV1p1beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p1beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p1beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p1beta1Position `json:"position,omitempty"` @@ -4118,7 +4120,9 @@ func (s *GoogleCloudVisionV1p2beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p2beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p2beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p2beta1Position `json:"position,omitempty"` @@ -6038,7 +6042,9 @@ func (s *GoogleCloudVisionV1p3beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p3beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p3beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p3beta1Position `json:"position,omitempty"` @@ -8105,7 +8111,9 @@ func (s *GoogleCloudVisionV1p4beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p4beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p4beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p4beta1Position `json:"position,omitempty"` @@ -9887,7 +9895,10 @@ func (s KeyValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Landmark: A face-specific landmark (for example, a face feature). +// Landmark: A face-specific landmark (for example, a face feature). Landmark +// positions may fall outside the bounds of the image if the face is near one +// or more edges of the image. Therefore it is NOT guaranteed that `0 <= x < +// width` or `0 <= y < height`. type Landmark struct { // Position: Face landmark position. Position *Position `json:"position,omitempty"` diff --git a/vision/v1p1beta1/vision-api.json b/vision/v1p1beta1/vision-api.json index ed138c80eee..5471e3f7dc4 100644 --- a/vision/v1p1beta1/vision-api.json +++ b/vision/v1p1beta1/vision-api.json @@ -449,7 +449,7 @@ } } }, - "revision": "20231219", + "revision": "20240823", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AnnotateFileResponse": { @@ -1856,7 +1856,7 @@ "type": "object" }, "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark", "properties": { "position": { @@ -3456,7 +3456,7 @@ "type": "object" }, "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark", "properties": { "position": { @@ -4905,7 +4905,7 @@ "type": "object" }, "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark", "properties": { "position": { @@ -6448,7 +6448,7 @@ "type": "object" }, "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark", "properties": { "position": { @@ -7518,7 +7518,7 @@ "type": "object" }, "Landmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "Landmark", "properties": { "position": { diff --git a/vision/v1p1beta1/vision-gen.go b/vision/v1p1beta1/vision-gen.go index eebf55e26ec..b5aaa0a6567 100644 --- a/vision/v1p1beta1/vision-gen.go +++ b/vision/v1p1beta1/vision-gen.go @@ -2069,7 +2069,9 @@ func (s *GoogleCloudVisionV1p1beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p1beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p1beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p1beta1Position `json:"position,omitempty"` @@ -4234,7 +4236,9 @@ func (s *GoogleCloudVisionV1p2beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p2beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p2beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p2beta1Position `json:"position,omitempty"` @@ -6154,7 +6158,9 @@ func (s *GoogleCloudVisionV1p3beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p3beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p3beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p3beta1Position `json:"position,omitempty"` @@ -8221,7 +8227,9 @@ func (s *GoogleCloudVisionV1p4beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p4beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p4beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p4beta1Position `json:"position,omitempty"` @@ -9793,7 +9801,10 @@ func (s KeyValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Landmark: A face-specific landmark (for example, a face feature). +// Landmark: A face-specific landmark (for example, a face feature). Landmark +// positions may fall outside the bounds of the image if the face is near one +// or more edges of the image. Therefore it is NOT guaranteed that `0 <= x < +// width` or `0 <= y < height`. type Landmark struct { // Position: Face landmark position. Position *Position `json:"position,omitempty"` diff --git a/vision/v1p2beta1/vision-api.json b/vision/v1p2beta1/vision-api.json index fd09813177e..6f1d63a1e5e 100644 --- a/vision/v1p2beta1/vision-api.json +++ b/vision/v1p2beta1/vision-api.json @@ -449,7 +449,7 @@ } } }, - "revision": "20231219", + "revision": "20240823", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AnnotateFileResponse": { @@ -1631,7 +1631,7 @@ "type": "object" }, "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark", "properties": { "position": { @@ -3270,7 +3270,7 @@ "type": "object" }, "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark", "properties": { "position": { @@ -4905,7 +4905,7 @@ "type": "object" }, "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark", "properties": { "position": { @@ -6448,7 +6448,7 @@ "type": "object" }, "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark", "properties": { "position": { @@ -7518,7 +7518,7 @@ "type": "object" }, "Landmark": { - "description": "A face-specific landmark (for example, a face feature).", + "description": "A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 \u003c= x \u003c width` or `0 \u003c= y \u003c height`.", "id": "Landmark", "properties": { "position": { diff --git a/vision/v1p2beta1/vision-gen.go b/vision/v1p2beta1/vision-gen.go index 6f66a583271..f6cd774549c 100644 --- a/vision/v1p2beta1/vision-gen.go +++ b/vision/v1p2beta1/vision-gen.go @@ -1731,7 +1731,9 @@ func (s *GoogleCloudVisionV1p1beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p1beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p1beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p1beta1Position `json:"position,omitempty"` @@ -3947,7 +3949,9 @@ func (s *GoogleCloudVisionV1p2beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p2beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p2beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p2beta1Position `json:"position,omitempty"` @@ -6154,7 +6158,9 @@ func (s *GoogleCloudVisionV1p3beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p3beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p3beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p3beta1Position `json:"position,omitempty"` @@ -8221,7 +8227,9 @@ func (s *GoogleCloudVisionV1p4beta1FaceAnnotation) UnmarshalJSON(data []byte) er } // GoogleCloudVisionV1p4beta1FaceAnnotationLandmark: A face-specific landmark -// (for example, a face feature). +// (for example, a face feature). Landmark positions may fall outside the +// bounds of the image if the face is near one or more edges of the image. +// Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`. type GoogleCloudVisionV1p4beta1FaceAnnotationLandmark struct { // Position: Face landmark position. Position *GoogleCloudVisionV1p4beta1Position `json:"position,omitempty"` @@ -9793,7 +9801,10 @@ func (s KeyValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Landmark: A face-specific landmark (for example, a face feature). +// Landmark: A face-specific landmark (for example, a face feature). Landmark +// positions may fall outside the bounds of the image if the face is near one +// or more edges of the image. Therefore it is NOT guaranteed that `0 <= x < +// width` or `0 <= y < height`. type Landmark struct { // Position: Face landmark position. Position *Position `json:"position,omitempty"`