From efe3d6fd433ece9d59ce8b747774881f0fcf410c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 11 Nov 2023 00:22:14 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2258) --- aiplatform/v1/aiplatform-api.json | 311 ++++-- aiplatform/v1/aiplatform-gen.go | 976 ++++++++++++++---- aiplatform/v1beta1/aiplatform-api.json | 117 ++- aiplatform/v1beta1/aiplatform-gen.go | 416 +++++++- backupdr/v1/backupdr-api.json | 46 +- backupdr/v1/backupdr-gen.go | 81 ++ chromemanagement/v1/chromemanagement-api.json | 10 +- chromemanagement/v1/chromemanagement-gen.go | 4 + compute/v0.alpha/compute-api.json | 94 +- compute/v0.alpha/compute-gen.go | 201 +++- dlp/v2/dlp-api.json | 5 +- dlp/v2/dlp-gen.go | 5 +- playintegrity/v1/playintegrity-api.json | 50 +- playintegrity/v1/playintegrity-gen.go | 81 -- trafficdirector/v3/trafficdirector-api.json | 21 +- trafficdirector/v3/trafficdirector-gen.go | 33 +- 16 files changed, 1919 insertions(+), 532 deletions(-) diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index fa61125be93..23669328da9 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -2776,6 +2776,62 @@ }, "endpoints": { "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates an Endpoint.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints", @@ -10838,6 +10894,62 @@ "resources": { "models": { "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.publishers.models.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.publishers.models.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "predict": { "description": "Perform an online prediction.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:predict", @@ -14336,7 +14448,7 @@ } } }, - "revision": "20231101", + "revision": "20231107", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -15526,6 +15638,34 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ComputeTokensRequest": { + "description": "Request message for ComputeTokens RPC call.", + "id": "GoogleCloudAiplatformV1ComputeTokensRequest", + "properties": { + "instances": { + "description": "Required. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.", + "items": { + "type": "any" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ComputeTokensResponse": { + "description": "Response message for ComputeTokens RPC call.", + "id": "GoogleCloudAiplatformV1ComputeTokensResponse", + "properties": { + "tokensInfo": { + "description": "Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1TokensInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ContainerRegistryDestination": { "description": "The Container Registry location for the container image.", "id": "GoogleCloudAiplatformV1ContainerRegistryDestination", @@ -15685,6 +15825,37 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1CountTokensRequest": { + "description": "Request message for PredictionService.CountTokens.", + "id": "GoogleCloudAiplatformV1CountTokensRequest", + "properties": { + "instances": { + "description": "Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", + "items": { + "type": "any" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1CountTokensResponse": { + "description": "Response message for PredictionService.CountTokens.", + "id": "GoogleCloudAiplatformV1CountTokensResponse", + "properties": { + "totalBillableCharacters": { + "description": "The total number of billable characters counted across all instances from the request.", + "format": "int32", + "type": "integer" + }, + "totalTokens": { + "description": "The total number of tokens counted across all instances from the request.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1CreateDatasetOperationMetadata": { "description": "Runtime operation information for DatasetService.CreateDataset.", "id": "GoogleCloudAiplatformV1CreateDatasetOperationMetadata", @@ -16676,7 +16847,7 @@ }, "dedicatedResources": { "$ref": "GoogleCloudAiplatformV1DedicatedResources", - "description": "Optional. A description of resources that are dedicated to the DeployedIndex, and that need a higher degree of manual configuration. If min_replica_count is not set, the default value is 2 (we don't provide SLA when min_replica_count=1). If max_replica_count is not set, the default value is min_replica_count. The max allowed replica count is 1000. Available machine types for SMALL shard: e2-standard-2 and all machine types available for MEDIUM and LARGE shard. Available machine types for MEDIUM shard: e2-standard-16 and all machine types available for LARGE shard. Available machine types for LARGE shard: e2-highmem-16, n2d-standard-32. n1-standard-16 and n1-standard-32 are still available, but we recommend e2-standard-16 and e2-highmem-16 for cost efficiency." + "description": "Optional. A description of resources that are dedicated to the DeployedIndex, and that need a higher degree of manual configuration. The field min_replica_count must be set to a value strictly greater than 0, or else validation will fail. We don't provide SLA when min_replica_count=1. If max_replica_count is not set, the default value is min_replica_count. The max allowed replica count is 1000. Available machine types for SMALL shard: e2-standard-2 and all machine types available for MEDIUM and LARGE shard. Available machine types for MEDIUM shard: e2-standard-16 and all machine types available for LARGE shard. Available machine types for LARGE shard: e2-highmem-16, n2d-standard-32. n1-standard-16 and n1-standard-32 are still available, but we recommend e2-standard-16 and e2-highmem-16 for cost efficiency." }, "deployedIndexAuthConfig": { "$ref": "GoogleCloudAiplatformV1DeployedIndexAuthConfig", @@ -18333,14 +18504,6 @@ "readOnly": true, "type": "string" }, - "dedicatedServingEndpoint": { - "$ref": "GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint", - "description": "Optional. The dedicated serving endpoint for this FeatureOnlineStore, which is different from common Vertex service endpoint." - }, - "embeddingManagement": { - "$ref": "GoogleCloudAiplatformV1FeatureOnlineStoreEmbeddingManagement", - "description": "Optional. The settings for embedding management in FeatureOnlineStore." - }, "etag": { "description": "Optional. Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -18412,38 +18575,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint": { - "description": "The dedicated serving endpoint for this FeatureOnlineStore. Only need to set when you choose Optimized storage type or enable EmbeddingManagement. Will use public endpoint by default.", - "id": "GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint", - "properties": { - "privateServiceConnectConfig": { - "$ref": "GoogleCloudAiplatformV1PrivateServiceConnectConfig", - "description": "Optional. Private service connect config. If PrivateServiceConnectConfig.enable_private_service_connect set to true, customers will use private service connection to send request. Otherwise, the connection will set to public endpoint." - }, - "publicEndpointDomainName": { - "description": "Output only. This field will be populated with the domain name to use for this FeatureOnlineStore", - "readOnly": true, - "type": "string" - }, - "serviceAttachment": { - "description": "Output only. The name of the service attachment resource. Populated if private service connect is enabled and after FeatureViewSync is created.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1FeatureOnlineStoreEmbeddingManagement": { - "description": "Contains settings for embedding management.", - "id": "GoogleCloudAiplatformV1FeatureOnlineStoreEmbeddingManagement", - "properties": { - "enabled": { - "description": "Optional. Immutable. Whether to enable embedding management in this FeatureOnlineStore. It's immutable after creation to ensure the FeatureOnlineStore availability.", - "type": "boolean" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1FeatureSelector": { "description": "Selector for Features of an EntityType.", "id": "GoogleCloudAiplatformV1FeatureSelector", @@ -18633,10 +18764,6 @@ "format": "google-datetime", "readOnly": true, "type": "string" - }, - "vectorSearchConfig": { - "$ref": "GoogleCloudAiplatformV1FeatureViewVectorSearchConfig", - "description": "Optional. Configuration for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving." } }, "type": "object" @@ -18728,73 +18855,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1FeatureViewVectorSearchConfig": { - "description": "Configuration for vector search.", - "id": "GoogleCloudAiplatformV1FeatureViewVectorSearchConfig", - "properties": { - "bruteForceConfig": { - "$ref": "GoogleCloudAiplatformV1FeatureViewVectorSearchConfigBruteForceConfig", - "description": "Optional. Configuration options for using brute force search, which simply implements the standard linear search in the database for each query. It is primarily meant for benchmarking and to generate the ground truth for approximate search." - }, - "crowdingColumn": { - "description": "Optional. Column of crowding. This column contains crowding attribute which is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than some value k' of the k neighbors returned have the same value of crowding_attribute.", - "type": "string" - }, - "distanceMeasureType": { - "description": "Optional. The distance measure used in nearest neighbor search.", - "enum": [ - "DISTANCE_MEASURE_TYPE_UNSPECIFIED", - "SQUARED_L2_DISTANCE", - "COSINE_DISTANCE", - "DOT_PRODUCT_DISTANCE" - ], - "enumDescriptions": [ - "Should not be set.", - "Euclidean (L_2) Distance.", - "Cosine Distance. Defined as 1 - cosine similarity. We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead of COSINE distance. Our algorithms have been more optimized for DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is mathematically equivalent to COSINE distance and results in the same ranking.", - "Dot Product Distance. Defined as a negative of the dot product." - ], - "type": "string" - }, - "embeddingColumn": { - "description": "Optional. Column of embedding. This column contains the source data to create index for vector search. embedding_column must be set when using vector search.", - "type": "string" - }, - "embeddingDimension": { - "description": "Optional. The number of dimensions of the input embedding.", - "format": "int32", - "type": "integer" - }, - "filterColumns": { - "description": "Optional. Columns of features that're used to filter vector search results.", - "items": { - "type": "string" - }, - "type": "array" - }, - "treeAhConfig": { - "$ref": "GoogleCloudAiplatformV1FeatureViewVectorSearchConfigTreeAHConfig", - "description": "Optional. Configuration options for the tree-AH algorithm (Shallow tree + Asymmetric Hashing). Please refer to this paper for more details: https://arxiv.org/abs/1908.10396" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1FeatureViewVectorSearchConfigBruteForceConfig": { - "id": "GoogleCloudAiplatformV1FeatureViewVectorSearchConfigBruteForceConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudAiplatformV1FeatureViewVectorSearchConfigTreeAHConfig": { - "id": "GoogleCloudAiplatformV1FeatureViewVectorSearchConfigTreeAHConfig", - "properties": { - "leafNodeEmbeddingCount": { - "description": "Optional. Number of embeddings on each leaf node. The default value is 1000 if not set.", - "format": "int64", - "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", @@ -28790,7 +28850,7 @@ "type": "object" }, "GoogleCloudAiplatformV1Study": { - "description": "A message representing a Study. Next id: 12", + "description": "A message representing a Study.", "id": "GoogleCloudAiplatformV1Study", "properties": { "createTime": { @@ -29909,6 +29969,29 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1TokensInfo": { + "description": "Tokens info with a list of tokens and the corresponding list of token ids.", + "id": "GoogleCloudAiplatformV1TokensInfo", + "properties": { + "tokenIds": { + "description": "A list of token ids from the input.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "tokens": { + "description": "A list of tokens from the input.", + "items": { + "format": "byte", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1TrainingConfig": { "description": "CMLE training config. For every active learning labeling iteration, system will train a machine learning model on CMLE. The trained model will be used by data sampling algorithm to select DataItems.", "id": "GoogleCloudAiplatformV1TrainingConfig", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index 3795deb55d5..e34d4e95161 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -3504,6 +3504,74 @@ func (s *GoogleCloudAiplatformV1CompletionStats) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ComputeTokensRequest: Request message for +// ComputeTokens RPC call. +type GoogleCloudAiplatformV1ComputeTokensRequest struct { + // Instances: Required. The instances that are the input to token + // computing API call. Schema is identical to the prediction schema of + // the text model, even for the non-text models, like chat models, or + // Codey models. + Instances []interface{} `json:"instances,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ComputeTokensRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ComputeTokensRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ComputeTokensResponse: Response message for +// ComputeTokens RPC call. +type GoogleCloudAiplatformV1ComputeTokensResponse struct { + // TokensInfo: Lists of tokens info from the input. A + // ComputeTokensRequest could have multiple instances with a prompt in + // each instance. We also need to return lists of tokens info for the + // request with multiple instances. + TokensInfo []*GoogleCloudAiplatformV1TokensInfo `json:"tokensInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "TokensInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TokensInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ComputeTokensResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ComputeTokensResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ContainerRegistryDestination: The Container // Registry location for the container image. type GoogleCloudAiplatformV1ContainerRegistryDestination struct { @@ -3771,6 +3839,77 @@ func (s *GoogleCloudAiplatformV1CopyModelResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1CountTokensRequest: Request message for +// PredictionService.CountTokens. +type GoogleCloudAiplatformV1CountTokensRequest struct { + // Instances: Required. The instances that are the input to token + // counting call. Schema is identical to the prediction schema of the + // underlying model. + Instances []interface{} `json:"instances,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1CountTokensRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1CountTokensRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1CountTokensResponse: Response message for +// PredictionService.CountTokens. +type GoogleCloudAiplatformV1CountTokensResponse struct { + // TotalBillableCharacters: The total number of billable characters + // counted across all instances from the request. + TotalBillableCharacters int64 `json:"totalBillableCharacters,omitempty"` + + // TotalTokens: The total number of tokens counted across all instances + // from the request. + TotalTokens int64 `json:"totalTokens,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "TotalBillableCharacters") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TotalBillableCharacters") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1CountTokensResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1CountTokensResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1CreateDatasetOperationMetadata: Runtime // operation information for DatasetService.CreateDataset. type GoogleCloudAiplatformV1CreateDatasetOperationMetadata struct { @@ -5708,17 +5847,17 @@ type GoogleCloudAiplatformV1DeployedIndex struct { // DedicatedResources: Optional. A description of resources that are // dedicated to the DeployedIndex, and that need a higher degree of - // manual configuration. If min_replica_count is not set, the default - // value is 2 (we don't provide SLA when min_replica_count=1). If - // max_replica_count is not set, the default value is min_replica_count. - // The max allowed replica count is 1000. Available machine types for - // SMALL shard: e2-standard-2 and all machine types available for MEDIUM - // and LARGE shard. Available machine types for MEDIUM shard: - // e2-standard-16 and all machine types available for LARGE shard. - // Available machine types for LARGE shard: e2-highmem-16, - // n2d-standard-32. n1-standard-16 and n1-standard-32 are still - // available, but we recommend e2-standard-16 and e2-highmem-16 for cost - // efficiency. + // manual configuration. The field min_replica_count must be set to a + // value strictly greater than 0, or else validation will fail. We don't + // provide SLA when min_replica_count=1. If max_replica_count is not + // set, the default value is min_replica_count. The max allowed replica + // count is 1000. Available machine types for SMALL shard: e2-standard-2 + // and all machine types available for MEDIUM and LARGE shard. Available + // machine types for MEDIUM shard: e2-standard-16 and all machine types + // available for LARGE shard. Available machine types for LARGE shard: + // e2-highmem-16, n2d-standard-32. n1-standard-16 and n1-standard-32 are + // still available, but we recommend e2-standard-16 and e2-highmem-16 + // for cost efficiency. DedicatedResources *GoogleCloudAiplatformV1DedicatedResources `json:"dedicatedResources,omitempty"` // DeployedIndexAuthConfig: Optional. If set, the authentication is @@ -8732,15 +8871,6 @@ type GoogleCloudAiplatformV1FeatureOnlineStore struct { // created. CreateTime string `json:"createTime,omitempty"` - // DedicatedServingEndpoint: Optional. The dedicated serving endpoint - // for this FeatureOnlineStore, which is different from common Vertex - // service endpoint. - DedicatedServingEndpoint *GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint `json:"dedicatedServingEndpoint,omitempty"` - - // EmbeddingManagement: Optional. The settings for embedding management - // in FeatureOnlineStore. - EmbeddingManagement *GoogleCloudAiplatformV1FeatureOnlineStoreEmbeddingManagement `json:"embeddingManagement,omitempty"` - // Etag: Optional. Used to perform consistent read-modify-write updates. // If not set, a blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -8876,82 +9006,6 @@ func (s *GoogleCloudAiplatformV1FeatureOnlineStoreBigtableAutoScaling) MarshalJS return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint: -// The dedicated serving endpoint for this FeatureOnlineStore. Only need -// to set when you choose Optimized storage type or enable -// EmbeddingManagement. Will use public endpoint by default. -type GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint struct { - // PrivateServiceConnectConfig: Optional. Private service connect - // config. If PrivateServiceConnectConfig.enable_private_service_connect - // set to true, customers will use private service connection to send - // request. Otherwise, the connection will set to public endpoint. - PrivateServiceConnectConfig *GoogleCloudAiplatformV1PrivateServiceConnectConfig `json:"privateServiceConnectConfig,omitempty"` - - // PublicEndpointDomainName: Output only. This field will be populated - // with the domain name to use for this FeatureOnlineStore - PublicEndpointDomainName string `json:"publicEndpointDomainName,omitempty"` - - // ServiceAttachment: Output only. The name of the service attachment - // resource. Populated if private service connect is enabled and after - // FeatureViewSync is created. - ServiceAttachment string `json:"serviceAttachment,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PrivateServiceConnectConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "PrivateServiceConnectConfig") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1FeatureOnlineStoreEmbeddingManagement: -// Contains settings for embedding management. -type GoogleCloudAiplatformV1FeatureOnlineStoreEmbeddingManagement struct { - // Enabled: Optional. Immutable. Whether to enable embedding management - // in this FeatureOnlineStore. It's immutable after creation to ensure - // the FeatureOnlineStore availability. - Enabled bool `json:"enabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1FeatureOnlineStoreEmbeddingManagement) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1FeatureOnlineStoreEmbeddingManagement - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1FeatureSelector: Selector for Features of an // EntityType. type GoogleCloudAiplatformV1FeatureSelector struct { @@ -9307,12 +9361,6 @@ type GoogleCloudAiplatformV1FeatureView struct { // updated. UpdateTime string `json:"updateTime,omitempty"` - // VectorSearchConfig: Optional. Configuration for vector search. It - // contains the required configurations to create an index from source - // data, so that approximate nearest neighbor (a.k.a ANN) algorithms - // search can be performed during online serving. - VectorSearchConfig *GoogleCloudAiplatformV1FeatureViewVectorSearchConfig `json:"vectorSearchConfig,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -9521,113 +9569,6 @@ func (s *GoogleCloudAiplatformV1FeatureViewSyncConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1FeatureViewVectorSearchConfig: Configuration -// for vector search. -type GoogleCloudAiplatformV1FeatureViewVectorSearchConfig struct { - // BruteForceConfig: Optional. Configuration options for using brute - // force search, which simply implements the standard linear search in - // the database for each query. It is primarily meant for benchmarking - // and to generate the ground truth for approximate search. - BruteForceConfig *GoogleCloudAiplatformV1FeatureViewVectorSearchConfigBruteForceConfig `json:"bruteForceConfig,omitempty"` - - // CrowdingColumn: Optional. Column of crowding. This column contains - // crowding attribute which is a constraint on a neighbor list produced - // by nearest neighbor search requiring that no more than some value k' - // of the k neighbors returned have the same value of - // crowding_attribute. - CrowdingColumn string `json:"crowdingColumn,omitempty"` - - // DistanceMeasureType: Optional. The distance measure used in nearest - // neighbor search. - // - // Possible values: - // "DISTANCE_MEASURE_TYPE_UNSPECIFIED" - Should not be set. - // "SQUARED_L2_DISTANCE" - Euclidean (L_2) Distance. - // "COSINE_DISTANCE" - Cosine Distance. Defined as 1 - cosine - // similarity. We strongly suggest using DOT_PRODUCT_DISTANCE + - // UNIT_L2_NORM instead of COSINE distance. Our algorithms have been - // more optimized for DOT_PRODUCT distance which, when combined with - // UNIT_L2_NORM, is mathematically equivalent to COSINE distance and - // results in the same ranking. - // "DOT_PRODUCT_DISTANCE" - Dot Product Distance. Defined as a - // negative of the dot product. - DistanceMeasureType string `json:"distanceMeasureType,omitempty"` - - // EmbeddingColumn: Optional. Column of embedding. This column contains - // the source data to create index for vector search. embedding_column - // must be set when using vector search. - EmbeddingColumn string `json:"embeddingColumn,omitempty"` - - // EmbeddingDimension: Optional. The number of dimensions of the input - // embedding. - EmbeddingDimension int64 `json:"embeddingDimension,omitempty"` - - // FilterColumns: Optional. Columns of features that're used to filter - // vector search results. - FilterColumns []string `json:"filterColumns,omitempty"` - - // TreeAhConfig: Optional. Configuration options for the tree-AH - // algorithm (Shallow tree + Asymmetric Hashing). Please refer to this - // paper for more details: https://arxiv.org/abs/1908.10396 - TreeAhConfig *GoogleCloudAiplatformV1FeatureViewVectorSearchConfigTreeAHConfig `json:"treeAhConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BruteForceConfig") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BruteForceConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1FeatureViewVectorSearchConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1FeatureViewVectorSearchConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GoogleCloudAiplatformV1FeatureViewVectorSearchConfigBruteForceConfig struct { -} - -type GoogleCloudAiplatformV1FeatureViewVectorSearchConfigTreeAHConfig struct { - // LeafNodeEmbeddingCount: Optional. Number of embeddings on each leaf - // node. The default value is 1000 if not set. - LeafNodeEmbeddingCount int64 `json:"leafNodeEmbeddingCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "LeafNodeEmbeddingCount") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LeafNodeEmbeddingCount") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1FeatureViewVectorSearchConfigTreeAHConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1FeatureViewVectorSearchConfigTreeAHConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, 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 @@ -28802,8 +28743,7 @@ func (s *GoogleCloudAiplatformV1StringArray) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1Study: A message representing a Study. Next -// id: 12 +// GoogleCloudAiplatformV1Study: A message representing a Study. type GoogleCloudAiplatformV1Study struct { // CreateTime: Output only. Time at which the study was created. CreateTime string `json:"createTime,omitempty"` @@ -30725,6 +30665,38 @@ func (s *GoogleCloudAiplatformV1TimestampSplit) UnmarshalJSON(data []byte) error return nil } +// GoogleCloudAiplatformV1TokensInfo: Tokens info with a list of tokens +// and the corresponding list of token ids. +type GoogleCloudAiplatformV1TokensInfo struct { + // TokenIds: A list of token ids from the input. + TokenIds googleapi.Int64s `json:"tokenIds,omitempty"` + + // Tokens: A list of tokens from the input. + Tokens []string `json:"tokens,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TokenIds") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TokenIds") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1TokensInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TokensInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1TrainingConfig: CMLE training config. For // every active learning labeling iteration, system will train a machine // learning model on CMLE. The trained model will be used by data @@ -45266,6 +45238,297 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ... } +// method id "aiplatform.projects.locations.endpoints.computeTokens": + +type ProjectsLocationsEndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens +// and token ids. +func (r *ProjectsLocationsEndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsEndpointsComputeTokensCall { + c := &ProjectsLocationsEndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEndpointsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEndpointsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEndpointsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.computeTokens" call. +// Exactly one of *GoogleCloudAiplatformV1ComputeTokensResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Return a list of tokens based on the input text.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:computeTokens", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.computeTokens", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+endpoint}:computeTokens", + // "request": { + // "$ref": "GoogleCloudAiplatformV1ComputeTokensRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1ComputeTokensResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.endpoints.countTokens": + +type ProjectsLocationsEndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token +// counting. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsEndpointsCountTokensCall { + c := &ProjectsLocationsEndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEndpointsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEndpointsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCountTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.countTokens" call. +// Exactly one of *GoogleCloudAiplatformV1CountTokensResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudAiplatformV1CountTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Perform a token counting.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:countTokens", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.countTokens", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+endpoint}:countTokens", + // "request": { + // "$ref": "GoogleCloudAiplatformV1CountTokensRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1CountTokensResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.endpoints.create": type ProjectsLocationsEndpointsCreateCall struct { @@ -86416,6 +86679,297 @@ func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.C } +// method id "aiplatform.projects.locations.publishers.models.computeTokens": + +type ProjectsLocationsPublishersModelsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens +// and token ids. +func (r *ProjectsLocationsPublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsPublishersModelsComputeTokensCall { + c := &ProjectsLocationsPublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.publishers.models.computeTokens" call. +// Exactly one of *GoogleCloudAiplatformV1ComputeTokensResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Return a list of tokens based on the input text.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:computeTokens", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.publishers.models.computeTokens", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+endpoint}:computeTokens", + // "request": { + // "$ref": "GoogleCloudAiplatformV1ComputeTokensRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1ComputeTokensResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.publishers.models.countTokens": + +type ProjectsLocationsPublishersModelsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token +// counting. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsPublishersModelsCountTokensCall { + c := &ProjectsLocationsPublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsCountTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPublishersModelsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.publishers.models.countTokens" call. +// Exactly one of *GoogleCloudAiplatformV1CountTokensResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudAiplatformV1CountTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Perform a token counting.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:countTokens", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.publishers.models.countTokens", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+endpoint}:countTokens", + // "request": { + // "$ref": "GoogleCloudAiplatformV1CountTokensRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1CountTokensResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.publishers.models.predict": type ProjectsLocationsPublishersModelsPredictCall struct { diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index db424ea1181..08d89a80a9f 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -3083,6 +3083,34 @@ }, "endpoints": { "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "countTokens": { "description": "Perform a token counting.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:countTokens", @@ -12439,6 +12467,34 @@ "resources": { "models": { "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.publishers.models.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "countTokens": { "description": "Perform a token counting.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:countTokens", @@ -16122,7 +16178,7 @@ } } }, - "revision": "20231101", + "revision": "20231107", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -17342,6 +17398,34 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ComputeTokensRequest": { + "description": "Request message for ComputeTokens RPC call.", + "id": "GoogleCloudAiplatformV1beta1ComputeTokensRequest", + "properties": { + "instances": { + "description": "Required. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.", + "items": { + "type": "any" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1ComputeTokensResponse": { + "description": "Response message for ComputeTokens RPC call.", + "id": "GoogleCloudAiplatformV1beta1ComputeTokensResponse", + "properties": { + "tokensInfo": { + "description": "Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TokensInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ContainerRegistryDestination": { "description": "The Container Registry location for the container image.", "id": "GoogleCloudAiplatformV1beta1ContainerRegistryDestination", @@ -18623,7 +18707,7 @@ }, "dedicatedResources": { "$ref": "GoogleCloudAiplatformV1beta1DedicatedResources", - "description": "Optional. A description of resources that are dedicated to the DeployedIndex, and that need a higher degree of manual configuration. If min_replica_count is not set, the default value is 2 (we don't provide SLA when min_replica_count=1). If max_replica_count is not set, the default value is min_replica_count. The max allowed replica count is 1000. Available machine types for SMALL shard: e2-standard-2 and all machine types available for MEDIUM and LARGE shard. Available machine types for MEDIUM shard: e2-standard-16 and all machine types available for LARGE shard. Available machine types for LARGE shard: e2-highmem-16, n2d-standard-32. n1-standard-16 and n1-standard-32 are still available, but we recommend e2-standard-16 and e2-highmem-16 for cost efficiency." + "description": "Optional. A description of resources that are dedicated to the DeployedIndex, and that need a higher degree of manual configuration. The field min_replica_count must be set to a value strictly greater than 0, or else validation will fail. We don't provide SLA when min_replica_count=1. If max_replica_count is not set, the default value is min_replica_count. The max allowed replica count is 1000. Available machine types for SMALL shard: e2-standard-2 and all machine types available for MEDIUM and LARGE shard. Available machine types for MEDIUM shard: e2-standard-16 and all machine types available for LARGE shard. Available machine types for LARGE shard: e2-highmem-16, n2d-standard-32. n1-standard-16 and n1-standard-32 are still available, but we recommend e2-standard-16 and e2-highmem-16 for cost efficiency." }, "deployedIndexAuthConfig": { "$ref": "GoogleCloudAiplatformV1beta1DeployedIndexAuthConfig", @@ -26988,6 +27072,10 @@ ], "type": "string" }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "Optional. The error details of the event." + }, "vmToken": { "description": "Required. The VM identity token (a JWT) for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", "type": "string" @@ -31407,7 +31495,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1Study": { - "description": "A message representing a Study. Next id: 12", + "description": "A message representing a Study.", "id": "GoogleCloudAiplatformV1beta1Study", "properties": { "createTime": { @@ -32585,6 +32673,29 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1TokensInfo": { + "description": "Tokens info with a list of tokens and the corresponding list of token ids.", + "id": "GoogleCloudAiplatformV1beta1TokensInfo", + "properties": { + "tokenIds": { + "description": "A list of token ids from the input.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "tokens": { + "description": "A list of tokens from the input.", + "items": { + "format": "byte", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1TrainingConfig": { "description": "CMLE training config. For every active learning labeling iteration, system will train a machine learning model on CMLE. The trained model will be used by data sampling algorithm to select DataItems.", "id": "GoogleCloudAiplatformV1beta1TrainingConfig", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 6378956ce46..ea03b7fba0e 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -3729,6 +3729,74 @@ func (s *GoogleCloudAiplatformV1beta1CompletionStats) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ComputeTokensRequest: Request message for +// ComputeTokens RPC call. +type GoogleCloudAiplatformV1beta1ComputeTokensRequest struct { + // Instances: Required. The instances that are the input to token + // computing API call. Schema is identical to the prediction schema of + // the text model, even for the non-text models, like chat models, or + // Codey models. + Instances []interface{} `json:"instances,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1ComputeTokensRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ComputeTokensRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1ComputeTokensResponse: Response message +// for ComputeTokens RPC call. +type GoogleCloudAiplatformV1beta1ComputeTokensResponse struct { + // TokensInfo: Lists of tokens info from the input. A + // ComputeTokensRequest could have multiple instances with a prompt in + // each instance. We also need to return lists of tokens info for the + // request with multiple instances. + TokensInfo []*GoogleCloudAiplatformV1beta1TokensInfo `json:"tokensInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "TokensInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TokensInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1ComputeTokensResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ComputeTokensResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1ContainerRegistryDestination: The // Container Registry location for the container image. type GoogleCloudAiplatformV1beta1ContainerRegistryDestination struct { @@ -6275,17 +6343,17 @@ type GoogleCloudAiplatformV1beta1DeployedIndex struct { // DedicatedResources: Optional. A description of resources that are // dedicated to the DeployedIndex, and that need a higher degree of - // manual configuration. If min_replica_count is not set, the default - // value is 2 (we don't provide SLA when min_replica_count=1). If - // max_replica_count is not set, the default value is min_replica_count. - // The max allowed replica count is 1000. Available machine types for - // SMALL shard: e2-standard-2 and all machine types available for MEDIUM - // and LARGE shard. Available machine types for MEDIUM shard: - // e2-standard-16 and all machine types available for LARGE shard. - // Available machine types for LARGE shard: e2-highmem-16, - // n2d-standard-32. n1-standard-16 and n1-standard-32 are still - // available, but we recommend e2-standard-16 and e2-highmem-16 for cost - // efficiency. + // manual configuration. The field min_replica_count must be set to a + // value strictly greater than 0, or else validation will fail. We don't + // provide SLA when min_replica_count=1. If max_replica_count is not + // set, the default value is min_replica_count. The max allowed replica + // count is 1000. Available machine types for SMALL shard: e2-standard-2 + // and all machine types available for MEDIUM and LARGE shard. Available + // machine types for MEDIUM shard: e2-standard-16 and all machine types + // available for LARGE shard. Available machine types for LARGE shard: + // e2-highmem-16, n2d-standard-32. n1-standard-16 and n1-standard-32 are + // still available, but we recommend e2-standard-16 and e2-highmem-16 + // for cost efficiency. DedicatedResources *GoogleCloudAiplatformV1beta1DedicatedResources `json:"dedicatedResources,omitempty"` // DeployedIndexAuthConfig: Optional. If set, the authentication is @@ -21517,6 +21585,9 @@ type GoogleCloudAiplatformV1beta1ReportExecutionEventRequest struct { // message within timeout. EventType string `json:"eventType,omitempty"` + // Status: Optional. The error details of the event. + Status *GoogleRpcStatus `json:"status,omitempty"` + // VmToken: Required. The VM identity token (a JWT) for authenticating // the VM. // https://cloud.google.com/compute/docs/instances/verifying-instance-identity @@ -30726,7 +30797,6 @@ func (s *GoogleCloudAiplatformV1beta1StringArray) MarshalJSON() ([]byte, error) } // GoogleCloudAiplatformV1beta1Study: A message representing a Study. -// Next id: 12 type GoogleCloudAiplatformV1beta1Study struct { // CreateTime: Output only. Time at which the study was created. CreateTime string `json:"createTime,omitempty"` @@ -32756,6 +32826,38 @@ func (s *GoogleCloudAiplatformV1beta1TimestampSplit) UnmarshalJSON(data []byte) return nil } +// GoogleCloudAiplatformV1beta1TokensInfo: Tokens info with a list of +// tokens and the corresponding list of token ids. +type GoogleCloudAiplatformV1beta1TokensInfo struct { + // TokenIds: A list of token ids from the input. + TokenIds googleapi.Int64s `json:"tokenIds,omitempty"` + + // Tokens: A list of tokens from the input. + Tokens []string `json:"tokens,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TokenIds") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TokenIds") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1TokensInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TokensInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1TrainingConfig: CMLE training config. For // every active learning labeling iteration, system will train a machine // learning model on CMLE. The trained model will be used by data @@ -49125,6 +49227,151 @@ func (c *ProjectsLocationsEdgeDevicesOperationsWaitCall) Do(opts ...googleapi.Ca } +// method id "aiplatform.projects.locations.endpoints.computeTokens": + +type ProjectsLocationsEndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens +// and token ids. +func (r *ProjectsLocationsEndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest) *ProjectsLocationsEndpointsComputeTokensCall { + c := &ProjectsLocationsEndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1computetokensrequest = googlecloudaiplatformv1beta1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEndpointsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEndpointsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEndpointsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1computetokensrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.computeTokens" call. +// Exactly one of *GoogleCloudAiplatformV1beta1ComputeTokensResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1beta1ComputeTokensResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1beta1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Return a list of tokens based on the input text.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:computeTokens", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.computeTokens", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+endpoint}:computeTokens", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.endpoints.countTokens": type ProjectsLocationsEndpointsCountTokensCall struct { @@ -96975,6 +97222,151 @@ func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.C } +// method id "aiplatform.projects.locations.publishers.models.computeTokens": + +type ProjectsLocationsPublishersModelsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens +// and token ids. +func (r *ProjectsLocationsPublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest) *ProjectsLocationsPublishersModelsComputeTokensCall { + c := &ProjectsLocationsPublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1computetokensrequest = googlecloudaiplatformv1beta1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1computetokensrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.publishers.models.computeTokens" call. +// Exactly one of *GoogleCloudAiplatformV1beta1ComputeTokensResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1beta1ComputeTokensResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1beta1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Return a list of tokens based on the input text.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:computeTokens", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.publishers.models.computeTokens", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+endpoint}:computeTokens", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.publishers.models.countTokens": type ProjectsLocationsPublishersModelsCountTokensCall struct { diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index ff917b30fa1..82712afdb00 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -535,7 +535,7 @@ } } }, - "revision": "20231008", + "revision": "20231029", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AuditConfig": { @@ -827,6 +827,16 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "workforceIdentityBasedManagementUri": { + "$ref": "WorkforceIdentityBasedManagementURI", + "description": "Output only. The hostnames of the exposed AGM endpoints for both types of user i.e. 1p and 3p, used to connect AGM/RM UI.", + "readOnly": true + }, + "workforceIdentityBasedOauth2ClientId": { + "$ref": "WorkforceIdentityBasedOAuth2ClientID", + "description": "Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.", + "readOnly": true } }, "type": "object" @@ -1059,6 +1069,40 @@ } }, "type": "object" + }, + "WorkforceIdentityBasedManagementURI": { + "description": "ManagementURI depending on the Workforce Identity i.e. either 1p or 3p.", + "id": "WorkforceIdentityBasedManagementURI", + "properties": { + "firstPartyManagementUri": { + "description": "Output only. First party Management URI for Google Identities.", + "readOnly": true, + "type": "string" + }, + "thirdPartyManagementUri": { + "description": "Output only. Third party Management URI for External Identity Providers.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WorkforceIdentityBasedOAuth2ClientID": { + "description": "OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p,", + "id": "WorkforceIdentityBasedOAuth2ClientID", + "properties": { + "firstPartyOauth2ClientId": { + "description": "Output only. First party OAuth Client ID for Google Identities.", + "readOnly": true, + "type": "string" + }, + "thirdPartyOauth2ClientId": { + "description": "Output only. Third party OAuth Client ID for External Identity Providers.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index efe64e1eec7..de390bc630b 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -685,6 +685,15 @@ type ManagementServer struct { // UpdateTime: Output only. The time when the instance was updated. UpdateTime string `json:"updateTime,omitempty"` + // WorkforceIdentityBasedManagementUri: Output only. The hostnames of + // the exposed AGM endpoints for both types of user i.e. 1p and 3p, used + // to connect AGM/RM UI. + WorkforceIdentityBasedManagementUri *WorkforceIdentityBasedManagementURI `json:"workforceIdentityBasedManagementUri,omitempty"` + + // WorkforceIdentityBasedOauth2ClientId: Output only. The OAuth client + // IDs for both types of user i.e. 1p and 3p. + WorkforceIdentityBasedOauth2ClientId *WorkforceIdentityBasedOAuth2ClientID `json:"workforceIdentityBasedOauth2ClientId,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1159,6 +1168,78 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// WorkforceIdentityBasedManagementURI: ManagementURI depending on the +// Workforce Identity i.e. either 1p or 3p. +type WorkforceIdentityBasedManagementURI struct { + // FirstPartyManagementUri: Output only. First party Management URI for + // Google Identities. + FirstPartyManagementUri string `json:"firstPartyManagementUri,omitempty"` + + // ThirdPartyManagementUri: Output only. Third party Management URI for + // External Identity Providers. + ThirdPartyManagementUri string `json:"thirdPartyManagementUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "FirstPartyManagementUri") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FirstPartyManagementUri") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WorkforceIdentityBasedManagementURI) MarshalJSON() ([]byte, error) { + type NoMethod WorkforceIdentityBasedManagementURI + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkforceIdentityBasedOAuth2ClientID: OAuth Client ID depending on +// the Workforce Identity i.e. either 1p or 3p, +type WorkforceIdentityBasedOAuth2ClientID struct { + // FirstPartyOauth2ClientId: Output only. First party OAuth Client ID + // for Google Identities. + FirstPartyOauth2ClientId string `json:"firstPartyOauth2ClientId,omitempty"` + + // ThirdPartyOauth2ClientId: Output only. Third party OAuth Client ID + // for External Identity Providers. + ThirdPartyOauth2ClientId string `json:"thirdPartyOauth2ClientId,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "FirstPartyOauth2ClientId") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FirstPartyOauth2ClientId") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WorkforceIdentityBasedOAuth2ClientID) MarshalJSON() ([]byte, error) { + type NoMethod WorkforceIdentityBasedOAuth2ClientID + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "backupdr.projects.locations.get": type ProjectsLocationsGetCall struct { diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index a0de84e5dba..9ffb3e8bf2f 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -1040,7 +1040,7 @@ } } }, - "revision": "20231108", + "revision": "20231110", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -3294,6 +3294,14 @@ "readOnly": true, "type": "string" }, + "networkBandwidthReport": { + "description": "Output only. Network bandwidth reports collected periodically sorted in a decreasing order of report_time.", + "items": { + "$ref": "GoogleChromeManagementV1NetworkBandwidthReport" + }, + "readOnly": true, + "type": "array" + }, "networkDiagnosticsReport": { "description": "Output only. Network diagnostics collected periodically.", "items": { diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index c7efc8732d6..468b0c91e60 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -3282,6 +3282,10 @@ type GoogleChromeManagementV1TelemetryDevice struct { // Name: Output only. Resource name of the device. Name string `json:"name,omitempty"` + // NetworkBandwidthReport: Output only. Network bandwidth reports + // collected periodically sorted in a decreasing order of report_time. + NetworkBandwidthReport []*GoogleChromeManagementV1NetworkBandwidthReport `json:"networkBandwidthReport,omitempty"` + // NetworkDiagnosticsReport: Output only. Network diagnostics collected // periodically. NetworkDiagnosticsReport []*GoogleChromeManagementV1NetworkDiagnosticsReport `json:"networkDiagnosticsReport,omitempty"` diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index f6eee23a77e..d10eb13e868 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -11328,6 +11328,11 @@ "required": true, "type": "string" }, + "noGracefulShutdown": { + "description": "If true, skips Graceful Shutdown.", + "location": "query", + "type": "boolean" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -13385,6 +13390,11 @@ "required": true, "type": "string" }, + "noGracefulShutdown": { + "description": "If true, skips Graceful Shutdown.", + "location": "query", + "type": "boolean" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -43542,7 +43552,7 @@ } } }, - "revision": "20231024", + "revision": "20231031", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -52704,7 +52714,7 @@ "type": "string" }, "allPorts": { - "description": "This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal and external protocol forwarding. Set this field to true to allow packets addressed to any port or packets lacking destination port information (for example, UDP fragments after the first fragment) to be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive.", + "description": "The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The allPorts field has the following limitations: - It requires that the forwarding rule IPProtocol be TCP, UDP, SCTP, or L3_DEFAULT. - It's applicable only to the following products: internal passthrough Network Load Balancers, backend service-based external passthrough Network Load Balancers, and internal and external protocol forwarding. - Set this field to true to allow packets addressed to any port or packets lacking destination port information (for example, UDP fragments after the first fragment) to be forwarded to the backends configured with this forwarding rule. The L3_DEFAULT protocol requires allPorts be set to true. ", "type": "boolean" }, "allowGlobalAccess": { @@ -52843,11 +52853,11 @@ "type": "boolean" }, "portRange": { - "description": "This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By backend service-based network load balancers, target pool-based network load balancers, internal proxy load balancers, external proxy load balancers, Traffic Director, external protocol forwarding, and Classic VPN. Some products have restrictions on what ports can be used. See port specifications for details. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. @pattern: \\\\d+(?:-\\\\d+)?", + "description": "The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The portRange field has the following limitations: - It requires that the forwarding rule IPProtocol be TCP, UDP, or SCTP, and - It's applicable only to the following products: external passthrough Network Load Balancers, internal and external proxy Network Load Balancers, internal and external Application Load Balancers, external protocol forwarding, and Classic VPN. - Some products have restrictions on what ports can be used. See port specifications for details. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. @pattern: \\\\d+(?:-\\\\d+)?", "type": "string" }, "ports": { - "description": "This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal protocol forwarding. You can specify a list of up to five ports by number, separated by commas. The ports can be contiguous or discontiguous. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. The ports, port_range, and allPorts fields are mutually exclusive. @pattern: \\\\d+(?:-\\\\d+)?", + "description": "The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The ports field has the following limitations: - It requires that the forwarding rule IPProtocol be TCP, UDP, or SCTP, and - It's applicable only to the following products: internal passthrough Network Load Balancers, backend service-based external passthrough Network Load Balancers, and internal protocol forwarding. - You can specify a list of up to five ports by number, separated by commas. The ports can be contiguous or discontiguous. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair if they share at least one port number. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair if they share at least one port number. @pattern: \\\\d+(?:-\\\\d+)?", "items": { "type": "string" }, @@ -58253,13 +58263,11 @@ "description": "The unit of measure for the target size.", "enum": [ "INSTANCE", - "VCPU", - "VM" + "VCPU" ], "enumDescriptions": [ "[Default] TargetSize is the target number of instances.", - "TargetSize is the target count of vCPUs of VMs.", - "TargetSize is the target number of VMs. Deprecated in favor of 'INSTANCE'." + "TargetSize is the target count of vCPUs of VMs." ], "type": "string" }, @@ -58864,7 +58872,7 @@ }, "requestedRunDuration": { "$ref": "Duration", - "description": "Requested run duration for instances that will be created by this request. If specified, the instance termination action will be performed at the end of the run duration." + "description": "Requested run duration for instances that will be created by this request. At the end of the run duration instance will be deleted." }, "resizeBy": { "description": "The number of instances to be created by this resize request. The group's target size will be increased by this number.", @@ -74208,7 +74216,7 @@ "type": "string" }, "managedProtectionTier": { - "description": "[Output Only] The Cloud Armor Managed Protection (CAMP) tier for this project. It can be one of the following values: CA_STANDARD, CAMP_PLUS_MONTHLY. If this field is not specified, it is assumed to be CA_STANDARD.", + "description": "[Output Only] The Cloud Armor Managed Protection (CAMP) tier for this project. It can be one of the following values: CA_STANDARD, CAMP_PLUS_PAYGO. If this field is not specified, it is assumed to be CA_STANDARD.", "enum": [ "CAMP_PLUS_ANNUAL", "CAMP_PLUS_PAYGO", @@ -79675,6 +79683,13 @@ }, "description": "[Output Only] Represents the status of the service integration specs defined by the user in instance.serviceIntegrationSpecs.", "type": "object" + }, + "shutdownDetails": { + "$ref": "ResourceStatusShutdownDetails", + "description": "[Output Only] Details about stopping state of instance" + }, + "upcomingMaintenance": { + "$ref": "UpcomingMaintenance" } }, "type": "object" @@ -79697,7 +79712,6 @@ "PREEMPTED", "SCHEDULED_STOP", "SHUTDOWN_DUE_TO_MAINTENANCE", - "UNSPECIFIED_TERMINATION_REASON", "USER_TERMINATED" ], "enumDescriptions": [ @@ -79713,7 +79727,6 @@ "Terminated due to preemption", "Terminated due to scheduled stop", "Terminated due to maintenance", - "The termination reason is not specified", "Terminated by user" ], "type": "string" @@ -79775,6 +79788,45 @@ }, "type": "object" }, + "ResourceStatusShutdownDetails": { + "description": "Specifies if the instance is in `SHUTTING_DOWN` state or there is a instance stopping scheduled.", + "id": "ResourceStatusShutdownDetails", + "properties": { + "maxDuration": { + "$ref": "Duration", + "description": "Duration for graceful shutdown. Only applicable when `stop_state=SHUTTING_DOWN`." + }, + "requestTimestamp": { + "description": "Past timestamp indicating the beginning of current `stopState` in RFC3339 text format.", + "type": "string" + }, + "stopState": { + "description": "Current stopping state of the instance.", + "enum": [ + "SHUTTING_DOWN", + "STOPPING" + ], + "enumDescriptions": [ + "The instance is gracefully shutting down.", + "The instance is stopping." + ], + "type": "string" + }, + "targetState": { + "description": "Target instance state.", + "enum": [ + "DELETED", + "STOPPED" + ], + "enumDescriptions": [ + "The instance will be deleted.", + "The instance will be stopped." + ], + "type": "string" + } + }, + "type": "object" + }, "RolloutPolicy": { "description": "A rollout policy configuration.", "id": "RolloutPolicy", @@ -82488,6 +82540,9 @@ "format": "int64", "type": "string" }, + "gracefulShutdown": { + "$ref": "SchedulingGracefulShutdown" + }, "hostErrorTimeoutSeconds": { "description": "Specify the time in seconds for host error detection, the value must be within the range of [90, 330] with the increment of 30, if unset, the default behavior of host error recovery will be used.", "format": "int32", @@ -82589,6 +82644,21 @@ }, "type": "object" }, + "SchedulingGracefulShutdown": { + "description": "Configuration for gracefully shutting down the instance.", + "id": "SchedulingGracefulShutdown", + "properties": { + "enabled": { + "description": "Opts-in for graceful shutdown.", + "type": "boolean" + }, + "maxDuration": { + "$ref": "Duration", + "description": "Specifies time needed to gracefully shut down the instance. After that time, the instance goes to STOPPING even if graceful shutdown is not completed." + } + }, + "type": "object" + }, "SchedulingNodeAffinity": { "description": "Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.", "id": "SchedulingNodeAffinity", diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 51bb70488e7..38a0a57bec8 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -14824,14 +14824,19 @@ type ForwardingRule struct { // "UDP" IPProtocol string `json:"IPProtocol,omitempty"` - // AllPorts: This field can only be used: - If IPProtocol is one of TCP, - // UDP, or SCTP. - By internal TCP/UDP load balancers, backend - // service-based network load balancers, and internal and external - // protocol forwarding. Set this field to true to allow packets + // AllPorts: The ports, portRange, and allPorts fields are mutually + // exclusive. Only packets addressed to ports in the specified range + // will be forwarded to the backends configured with this forwarding + // rule. The allPorts field has the following limitations: - It requires + // that the forwarding rule IPProtocol be TCP, UDP, SCTP, or L3_DEFAULT. + // - It's applicable only to the following products: internal + // passthrough Network Load Balancers, backend service-based external + // passthrough Network Load Balancers, and internal and external + // protocol forwarding. - Set this field to true to allow packets // addressed to any port or packets lacking destination port information // (for example, UDP fragments after the first fragment) to be forwarded - // to the backends configured with this forwarding rule. The ports, - // port_range, and allPorts fields are mutually exclusive. + // to the backends configured with this forwarding rule. The L3_DEFAULT + // protocol requires allPorts be set to true. AllPorts bool `json:"allPorts,omitempty"` // AllowGlobalAccess: This field is used along with the backend_service @@ -15017,37 +15022,39 @@ type ForwardingRule struct { // is not mutable. NoAutomateDnsZone bool `json:"noAutomateDnsZone,omitempty"` - // PortRange: This field can only be used: - If IPProtocol is one of - // TCP, UDP, or SCTP. - By backend service-based network load balancers, - // target pool-based network load balancers, internal proxy load - // balancers, external proxy load balancers, Traffic Director, external - // protocol forwarding, and Classic VPN. Some products have restrictions - // on what ports can be used. See port specifications for details. Only - // packets addressed to ports in the specified range will be forwarded - // to the backends configured with this forwarding rule. The ports, - // port_range, and allPorts fields are mutually exclusive. For external - // forwarding rules, two or more forwarding rules cannot use the same - // [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. - // For internal forwarding rules within the same VPC network, two or + // PortRange: The ports, portRange, and allPorts fields are mutually + // exclusive. Only packets addressed to ports in the specified range + // will be forwarded to the backends configured with this forwarding + // rule. The portRange field has the following limitations: - It + // requires that the forwarding rule IPProtocol be TCP, UDP, or SCTP, + // and - It's applicable only to the following products: external + // passthrough Network Load Balancers, internal and external proxy + // Network Load Balancers, internal and external Application Load + // Balancers, external protocol forwarding, and Classic VPN. - Some + // products have restrictions on what ports can be used. See port + // specifications for details. For external forwarding rules, two or // more forwarding rules cannot use the same [IPAddress, IPProtocol] - // pair, and cannot have overlapping portRanges. @pattern: - // \\d+(?:-\\d+)? + // pair, and cannot have overlapping portRanges. For internal forwarding + // rules within the same VPC network, two or more forwarding rules + // cannot use the same [IPAddress, IPProtocol] pair, and cannot have + // overlapping portRanges. @pattern: \\d+(?:-\\d+)? PortRange string `json:"portRange,omitempty"` - // Ports: This field can only be used: - If IPProtocol is one of TCP, - // UDP, or SCTP. - By internal TCP/UDP load balancers, backend - // service-based network load balancers, and internal protocol - // forwarding. You can specify a list of up to five ports by number, - // separated by commas. The ports can be contiguous or discontiguous. - // Only packets addressed to these ports will be forwarded to the - // backends configured with this forwarding rule. For external - // forwarding rules, two or more forwarding rules cannot use the same - // [IPAddress, IPProtocol] pair, and cannot share any values defined in - // ports. For internal forwarding rules within the same VPC network, two - // or more forwarding rules cannot use the same [IPAddress, IPProtocol] - // pair, and cannot share any values defined in ports. The ports, - // port_range, and allPorts fields are mutually exclusive. @pattern: - // \\d+(?:-\\d+)? + // Ports: The ports, portRange, and allPorts fields are mutually + // exclusive. Only packets addressed to ports in the specified range + // will be forwarded to the backends configured with this forwarding + // rule. The ports field has the following limitations: - It requires + // that the forwarding rule IPProtocol be TCP, UDP, or SCTP, and - It's + // applicable only to the following products: internal passthrough + // Network Load Balancers, backend service-based external passthrough + // Network Load Balancers, and internal protocol forwarding. - You can + // specify a list of up to five ports by number, separated by commas. + // The ports can be contiguous or discontiguous. For external forwarding + // rules, two or more forwarding rules cannot use the same [IPAddress, + // IPProtocol] pair if they share at least one port number. For internal + // forwarding rules within the same VPC network, two or more forwarding + // rules cannot use the same [IPAddress, IPProtocol] pair if they share + // at least one port number. @pattern: \\d+(?:-\\d+)? Ports []string `json:"ports,omitempty"` // PscConnectionId: [Output Only] The PSC connection id of the PSC @@ -22643,8 +22650,6 @@ type InstanceGroupManager struct { // "INSTANCE" - [Default] TargetSize is the target number of // instances. // "VCPU" - TargetSize is the target count of vCPUs of VMs. - // "VM" - TargetSize is the target number of VMs. Deprecated in favor - // of 'INSTANCE'. TargetSizeUnit string `json:"targetSizeUnit,omitempty"` // TargetStoppedSize: The target number of stopped instances for this @@ -23535,8 +23540,8 @@ type InstanceGroupManagerResizeRequest struct { QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` // RequestedRunDuration: Requested run duration for instances that will - // be created by this request. If specified, the instance termination - // action will be performed at the end of the run duration. + // be created by this request. At the end of the run duration instance + // will be deleted. RequestedRunDuration *Duration `json:"requestedRunDuration,omitempty"` // ResizeBy: The number of instances to be created by this resize @@ -45084,8 +45089,8 @@ type Project struct { // ManagedProtectionTier: [Output Only] The Cloud Armor Managed // Protection (CAMP) tier for this project. It can be one of the - // following values: CA_STANDARD, CAMP_PLUS_MONTHLY. If this field is - // not specified, it is assumed to be CA_STANDARD. + // following values: CA_STANDARD, CAMP_PLUS_PAYGO. If this field is not + // specified, it is assumed to be CA_STANDARD. // // Possible values: // "CAMP_PLUS_ANNUAL" - Plus tier protection annual. @@ -52595,6 +52600,12 @@ type ResourceStatus struct { // instance.serviceIntegrationSpecs. ServiceIntegrationStatuses map[string]ResourceStatusServiceIntegrationStatus `json:"serviceIntegrationStatuses,omitempty"` + // ShutdownDetails: [Output Only] Details about stopping state of + // instance + ShutdownDetails *ResourceStatusShutdownDetails `json:"shutdownDetails,omitempty"` + + UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` + // ForceSendFields is a list of field names (e.g. // "LastInstanceTerminationDetails") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -52638,8 +52649,6 @@ type ResourceStatusLastInstanceTerminationDetails struct { // "PREEMPTED" - Terminated due to preemption // "SCHEDULED_STOP" - Terminated due to scheduled stop // "SHUTDOWN_DUE_TO_MAINTENANCE" - Terminated due to maintenance - // "UNSPECIFIED_TERMINATION_REASON" - The termination reason is not - // specified // "USER_TERMINATED" - Terminated by user TerminationReason string `json:"terminationReason,omitempty"` @@ -52785,6 +52794,54 @@ func (s *ResourceStatusServiceIntegrationStatusBackupDRStatus) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ResourceStatusShutdownDetails: Specifies if the instance is in +// `SHUTTING_DOWN` state or there is a instance stopping scheduled. +type ResourceStatusShutdownDetails struct { + // MaxDuration: Duration for graceful shutdown. Only applicable when + // `stop_state=SHUTTING_DOWN`. + MaxDuration *Duration `json:"maxDuration,omitempty"` + + // RequestTimestamp: Past timestamp indicating the beginning of current + // `stopState` in RFC3339 text format. + RequestTimestamp string `json:"requestTimestamp,omitempty"` + + // StopState: Current stopping state of the instance. + // + // Possible values: + // "SHUTTING_DOWN" - The instance is gracefully shutting down. + // "STOPPING" - The instance is stopping. + StopState string `json:"stopState,omitempty"` + + // TargetState: Target instance state. + // + // Possible values: + // "DELETED" - The instance will be deleted. + // "STOPPED" - The instance will be stopped. + TargetState string `json:"targetState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxDuration") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxDuration") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourceStatusShutdownDetails) MarshalJSON() ([]byte, error) { + type NoMethod ResourceStatusShutdownDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RolloutPolicy: A rollout policy configuration. type RolloutPolicy struct { // DefaultRolloutTime: An optional RFC3339 timestamp on or after which @@ -56175,6 +56232,8 @@ type Scheduling struct { // or unset means default amount of memory of the current machine type. CurrentMemoryMb int64 `json:"currentMemoryMb,omitempty,string"` + GracefulShutdown *SchedulingGracefulShutdown `json:"gracefulShutdown,omitempty"` + // HostErrorTimeoutSeconds: Specify the time in seconds for host error // detection, the value must be within the range of [90, 330] with the // increment of 30, if unset, the default behavior of host error @@ -56307,6 +56366,40 @@ func (s *Scheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SchedulingGracefulShutdown: Configuration for gracefully shutting +// down the instance. +type SchedulingGracefulShutdown struct { + // Enabled: Opts-in for graceful shutdown. + Enabled bool `json:"enabled,omitempty"` + + // MaxDuration: Specifies time needed to gracefully shut down the + // instance. After that time, the instance goes to STOPPING even if + // graceful shutdown is not completed. + MaxDuration *Duration `json:"maxDuration,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SchedulingGracefulShutdown) MarshalJSON() ([]byte, error) { + type NoMethod SchedulingGracefulShutdown + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SchedulingNodeAffinity: Node Affinity: the configuration of desired // nodes onto which this Instance could be scheduled. type SchedulingNodeAffinity struct { @@ -124094,6 +124187,13 @@ func (r *InstancesService) Delete(project string, zone string, instance string) return c } +// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": +// If true, skips Graceful Shutdown. +func (c *InstancesDeleteCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesDeleteCall { + c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) + 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 @@ -124215,6 +124315,11 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, + // "noGracefulShutdown": { + // "description": "If true, skips Graceful Shutdown.", + // "location": "query", + // "type": "boolean" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -131842,6 +131947,13 @@ func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStop return c } +// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": +// If true, skips Graceful Shutdown. +func (c *InstancesStopCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesStopCall { + c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) + 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 @@ -131968,6 +132080,11 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "required": true, // "type": "string" // }, + // "noGracefulShutdown": { + // "description": "If true, skips Graceful Shutdown.", + // "location": "query", + // "type": "boolean" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 7c03707dc62..27f98881b3c 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -3714,7 +3714,7 @@ } } }, - "revision": "20231029", + "revision": "20231105", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -5048,7 +5048,8 @@ "properties": { "dataProfileJob": { "$ref": "GooglePrivacyDlpV2DataProfileJobConfig", - "description": "A copy of the configuration used to generate this profile." + "deprecated": true, + "description": "A copy of the configuration used to generate this profile. This is deprecated and will be replaced by DiscoveryConfig. DataProfileJobConfig will still be written here for Discovery in BigQuery for backwards compatibility, but will not be updated with new fields, while DiscoveryConfig will." }, "inspectConfig": { "$ref": "GooglePrivacyDlpV2InspectConfig", diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 6e18eccd598..92c97d43ba6 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -2810,7 +2810,10 @@ func (s *GooglePrivacyDlpV2DataProfileBigQueryRowSchema) MarshalJSON() ([]byte, // configurations used to generate the profile. type GooglePrivacyDlpV2DataProfileConfigSnapshot struct { // DataProfileJob: A copy of the configuration used to generate this - // profile. + // profile. This is deprecated and will be replaced by DiscoveryConfig. + // DataProfileJobConfig will still be written here for Discovery in + // BigQuery for backwards compatibility, but will not be updated with + // new fields, while DiscoveryConfig will. DataProfileJob *GooglePrivacyDlpV2DataProfileJobConfig `json:"dataProfileJob,omitempty"` // InspectConfig: A copy of the inspection config used to generate this diff --git a/playintegrity/v1/playintegrity-api.json b/playintegrity/v1/playintegrity-api.json index 00a4f75992a..483daaf6853 100644 --- a/playintegrity/v1/playintegrity-api.json +++ b/playintegrity/v1/playintegrity-api.json @@ -138,7 +138,7 @@ } } }, - "revision": "20231107", + "revision": "20231109", "rootUrl": "https://playintegrity.googleapis.com/", "schemas": { "AccountActivity": { @@ -366,21 +366,6 @@ }, "type": "object" }, - "GuidanceDetails": { - "deprecated": true, - "description": "Deprecated: this field is not used. Contains guidance details about the Integrity API response, providing additional context to the integrity verdicts.", - "id": "GuidanceDetails", - "properties": { - "userRemediationDetails": { - "description": "This shows when there is an issue with at least one of the integrity verdicts, which can be remedied by the user and provides additional details.", - "items": { - "$ref": "UserRemediationDetails" - }, - "type": "array" - } - }, - "type": "object" - }, "RequestDetails": { "description": "Contains the integrity request information.", "id": "RequestDetails", @@ -436,11 +421,6 @@ "$ref": "EnvironmentDetails", "description": "Details of the environment Play Integrity API runs in." }, - "guidanceDetails": { - "$ref": "GuidanceDetails", - "deprecated": true, - "description": "Deprecated: this field is not used. Additional guidance related to the integrity API response." - }, "requestDetails": { "$ref": "RequestDetails", "description": "Required. Details about the integrity request." @@ -451,34 +431,6 @@ } }, "type": "object" - }, - "UserRemediationDetails": { - "deprecated": true, - "description": "Deprecated: this field is not used. Contains details of remediation guidance that the user can perform.", - "id": "UserRemediationDetails", - "properties": { - "remediation": { - "description": "Description of the user remediation action.", - "enum": [ - "UNKNOWN_USER_REMEDIATION", - "RESTORE_FACTORY_ROM", - "LOCK_BOOTLOADER", - "GET_UNMODIFIED_APP", - "SIGN_INTO_GOOGLE_ACCOUNT", - "INSTALL_APP_FROM_PLAY" - ], - "enumDescriptions": [ - "User remediation is unknown.", - "The user has installed a custom ROM, and should restore the device to a clean factory ROM.", - "The device bootloader has been unlocked, the user should lock the bootloader.", - "The app is unrecognized. The user should get an unmodified version of the app.", - "The user has not signed into their Google account.", - "The user has no license. They should install or purchase the app on the Google Play Store to add it to their library." - ], - "type": "string" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/playintegrity/v1/playintegrity-gen.go b/playintegrity/v1/playintegrity-gen.go index 78eb50e31a2..943f1c769ab 100644 --- a/playintegrity/v1/playintegrity-gen.go +++ b/playintegrity/v1/playintegrity-gen.go @@ -528,40 +528,6 @@ func (s *EnvironmentDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GuidanceDetails: Deprecated: this field is not used. Contains -// guidance details about the Integrity API response, providing -// additional context to the integrity verdicts. -type GuidanceDetails struct { - // UserRemediationDetails: This shows when there is an issue with at - // least one of the integrity verdicts, which can be remedied by the - // user and provides additional details. - UserRemediationDetails []*UserRemediationDetails `json:"userRemediationDetails,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "UserRemediationDetails") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UserRemediationDetails") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GuidanceDetails) MarshalJSON() ([]byte, error) { - type NoMethod GuidanceDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // RequestDetails: Contains the integrity request information. type RequestDetails struct { // Nonce: Nonce that was provided in the request (which is base64 @@ -652,10 +618,6 @@ type TokenPayloadExternal struct { // runs in. EnvironmentDetails *EnvironmentDetails `json:"environmentDetails,omitempty"` - // GuidanceDetails: Deprecated: this field is not used. Additional - // guidance related to the integrity API response. - GuidanceDetails *GuidanceDetails `json:"guidanceDetails,omitempty"` - // RequestDetails: Required. Details about the integrity request. RequestDetails *RequestDetails `json:"requestDetails,omitempty"` @@ -688,49 +650,6 @@ func (s *TokenPayloadExternal) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UserRemediationDetails: Deprecated: this field is not used. Contains -// details of remediation guidance that the user can perform. -type UserRemediationDetails struct { - // Remediation: Description of the user remediation action. - // - // Possible values: - // "UNKNOWN_USER_REMEDIATION" - User remediation is unknown. - // "RESTORE_FACTORY_ROM" - The user has installed a custom ROM, and - // should restore the device to a clean factory ROM. - // "LOCK_BOOTLOADER" - The device bootloader has been unlocked, the - // user should lock the bootloader. - // "GET_UNMODIFIED_APP" - The app is unrecognized. The user should get - // an unmodified version of the app. - // "SIGN_INTO_GOOGLE_ACCOUNT" - The user has not signed into their - // Google account. - // "INSTALL_APP_FROM_PLAY" - The user has no license. They should - // install or purchase the app on the Google Play Store to add it to - // their library. - Remediation string `json:"remediation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Remediation") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Remediation") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UserRemediationDetails) MarshalJSON() ([]byte, error) { - type NoMethod UserRemediationDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // method id "playintegrity.decodeIntegrityToken": type V1DecodeIntegrityTokenCall struct { diff --git a/trafficdirector/v3/trafficdirector-api.json b/trafficdirector/v3/trafficdirector-api.json index bb684b569fa..0e96f293f26 100644 --- a/trafficdirector/v3/trafficdirector-api.json +++ b/trafficdirector/v3/trafficdirector-api.json @@ -128,7 +128,7 @@ } } }, - "revision": "20231018", + "revision": "20231101", "rootUrl": "https://trafficdirector.googleapis.com/", "schemas": { "Address": { @@ -898,6 +898,19 @@ "properties": {}, "type": "object" }, + "OrMatcher": { + "description": "Specifies a list of alternatives for the match.", + "id": "OrMatcher", + "properties": { + "valueMatchers": { + "items": { + "$ref": "ValueMatcher" + }, + "type": "array" + } + }, + "type": "object" + }, "PathSegment": { "description": "Specifies the segment in a path to retrieve value from Struct.", "id": "PathSegment", @@ -1251,7 +1264,7 @@ "type": "object" }, "ValueMatcher": { - "description": "Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. StructValue is not supported and is always not matched. [#next-free-field: 7]", + "description": "Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. StructValue is not supported and is always not matched. [#next-free-field: 8]", "id": "ValueMatcher", "properties": { "boolMatch": { @@ -1270,6 +1283,10 @@ "$ref": "NullMatch", "description": "If specified, a match occurs if and only if the target value is a NullValue." }, + "orMatch": { + "$ref": "OrMatcher", + "description": "If specified, a match occurs if and only if any of the alternatives in the match accept the value." + }, "presentMatch": { "description": "If specified, value match will be performed based on whether the path is referring to a valid primitive value in the metadata. If the path is referring to a non-primitive value, the result is always not matched.", "type": "boolean" diff --git a/trafficdirector/v3/trafficdirector-gen.go b/trafficdirector/v3/trafficdirector-gen.go index a14ef3852f3..d8ec925f2b8 100644 --- a/trafficdirector/v3/trafficdirector-gen.go +++ b/trafficdirector/v3/trafficdirector-gen.go @@ -1425,6 +1425,33 @@ func (s *NodeMatcher) MarshalJSON() ([]byte, error) { type NullMatch struct { } +// OrMatcher: Specifies a list of alternatives for the match. +type OrMatcher struct { + ValueMatchers []*ValueMatcher `json:"valueMatchers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ValueMatchers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ValueMatchers") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OrMatcher) MarshalJSON() ([]byte, error) { + type NoMethod OrMatcher + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PathSegment: Specifies the segment in a path to retrieve value from // Struct. type PathSegment struct { @@ -2032,7 +2059,7 @@ func (s *UpdateFailureState) MarshalJSON() ([]byte, error) { // ValueMatcher: Specifies the way to match a ProtobufWkt::Value. // Primitive values and ListValue are supported. StructValue is not -// supported and is always not matched. [#next-free-field: 7] +// supported and is always not matched. [#next-free-field: 8] type ValueMatcher struct { // BoolMatch: If specified, a match occurs if and only if the target // value is a bool value and is equal to this field. @@ -2050,6 +2077,10 @@ type ValueMatcher struct { // value is a NullValue. NullMatch *NullMatch `json:"nullMatch,omitempty"` + // OrMatch: If specified, a match occurs if and only if any of the + // alternatives in the match accept the value. + OrMatch *OrMatcher `json:"orMatch,omitempty"` + // PresentMatch: If specified, value match will be performed based on // whether the path is referring to a valid primitive value in the // metadata. If the path is referring to a non-primitive value, the