diff --git a/WORKSPACE b/WORKSPACE index cf2fa368e58d17..2db332e4e6d098 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -227,7 +227,7 @@ local_repository( path = ".", ) -_gapic_generator_go_version = "0.38.2" +_gapic_generator_go_version = "0.39.2" http_archive( name = "com_googleapis_gapic_generator_go", @@ -275,7 +275,7 @@ maven_install( ], ) -_gapic_generator_java_version = "2.28.0" +_gapic_generator_java_version = "2.29.0" maven_install( artifacts = [ @@ -324,7 +324,7 @@ load("@rules_gapic//python:py_gapic_repositories.bzl", "py_gapic_repositories") py_gapic_repositories() -_gapic_generator_python_version = "1.11.10" +_gapic_generator_python_version = "1.11.11" http_archive( name = "gapic_generator_python", @@ -406,7 +406,7 @@ pnpm_repository(name = "pnpm") ############################################################################## # PHP micro-generator -_gapic_generator_php_version = "1.9.1" +_gapic_generator_php_version = "1.9.2" http_archive( name = "gapic_generator_php", diff --git a/api-index-v1.json b/api-index-v1.json index 2f278ca1ec4caf..dac5e604dd0b6b 100644 --- a/api-index-v1.json +++ b/api-index-v1.json @@ -39660,6 +39660,17 @@ } ] }, + { + "shortName": "BulkDeleteConversations", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkDeleteConversations", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "POST", + "path": "/v1/{parent=projects/*/locations/*}/conversations:bulkDelete" + } + ] + }, { "shortName": "CalculateIssueModelStats", "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateIssueModelStats", @@ -40698,6 +40709,17 @@ } ] }, + { + "shortName": "ProcessOpenLineageRunEvent", + "fullName": "google.cloud.datacatalog.lineage.v1.Lineage.ProcessOpenLineageRunEvent", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "POST", + "path": "/v1/{parent=projects/*/locations/*}:processOpenLineageRunEvent" + } + ] + }, { "shortName": "SearchLinks", "fullName": "google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks", @@ -46076,17 +46098,17 @@ "options": { "go_package": { "valueCounts": { - "cloud.google.com/go/deploy/apiv1/deploypb;deploypb": 9 + "cloud.google.com/go/deploy/apiv1/deploypb;deploypb": 11 } }, "java_multiple_files": { "valueCounts": { - "true": 9 + "true": 11 } }, "java_package": { "valueCounts": { - "com.google.cloud.deploy.v1": 9 + "com.google.cloud.deploy.v1": 11 } } }, @@ -46128,6 +46150,17 @@ } ] }, + { + "shortName": "CancelAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelAutomationRun", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "POST", + "path": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel" + } + ] + }, { "shortName": "CancelRollout", "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelRollout", @@ -46139,6 +46172,17 @@ } ] }, + { + "shortName": "CreateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateAutomation", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "POST", + "path": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + } + ] + }, { "shortName": "CreateDeliveryPipeline", "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", @@ -46183,6 +46227,17 @@ } ] }, + { + "shortName": "DeleteAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteAutomation", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "DELETE", + "path": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + } + ] + }, { "shortName": "DeleteDeliveryPipeline", "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", @@ -46205,6 +46260,28 @@ } ] }, + { + "shortName": "GetAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomation", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "GET", + "path": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + } + ] + }, + { + "shortName": "GetAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomationRun", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "GET", + "path": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}" + } + ] + }, { "shortName": "GetConfig", "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", @@ -46282,6 +46359,28 @@ } ] }, + { + "shortName": "ListAutomationRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomationRuns", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "GET", + "path": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns" + } + ] + }, + { + "shortName": "ListAutomations", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomations", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "GET", + "path": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + } + ] + }, { "shortName": "ListDeliveryPipelines", "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", @@ -46348,6 +46447,17 @@ } ] }, + { + "shortName": "RollbackTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RollbackTarget", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "POST", + "path": "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget" + } + ] + }, { "shortName": "TerminateJobRun", "fullName": "google.cloud.deploy.v1.CloudDeploy.TerminateJobRun", @@ -46359,6 +46469,17 @@ } ] }, + { + "shortName": "UpdateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateAutomation", + "mode": "UNARY", + "bindings": [ + { + "httpMethod": "PATCH", + "path": "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + } + ] + }, { "shortName": "UpdateDeliveryPipeline", "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", @@ -61344,9 +61465,9 @@ "id": "google.cloud.location", "directory": "google/cloud/location", "version": "location", - "hostName": "cloud.googleapis.com", - "title": "Cloud Metadata API", - "description": "This API provides static metadata about Google Cloud Platform. Currently, it only provides basic information about Google Cloud locations, such as zones, regions, and countries.", + "hostName": "cloudlocations.googleapis.com", + "title": "Cloud Location API", + "description": "", "importDirectories": [ "google/api", "google/protobuf" @@ -61411,11 +61532,11 @@ ] } ], - "configFile": "cloud.yaml", + "configFile": "location.yaml", "serviceConfigApiNames": [ "google.cloud.location.Locations" ], - "nameInServiceConfig": "cloud.googleapis.com" + "nameInServiceConfig": "cloudlocations.googleapis.com" }, { "id": "google.cloud.managedidentities.v1", diff --git a/google/api/servicemanagement/v1/servicemanagement_v1.yaml b/google/api/servicemanagement/v1/servicemanagement_v1.yaml index a3416a02d25a0f..0ef9494b7bd737 100644 --- a/google/api/servicemanagement/v1/servicemanagement_v1.yaml +++ b/google/api/servicemanagement/v1/servicemanagement_v1.yaml @@ -161,21 +161,6 @@ documentation: - selector: google.longrunning.Operations.ListOperations description: Lists service operations that match the specified filter in the request. -backend: - rules: - - selector: 'google.api.servicemanagement.v1.ServiceManager.*' - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.CreateService - deadline: 20.0 - - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig - deadline: 20.0 - - selector: google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource - deadline: 20.0 - - selector: 'google.iam.v1.IAMPolicy.*' - deadline: 10.0 - - selector: 'google.longrunning.Operations.*' - deadline: 10.0 - http: rules: - selector: google.iam.v1.IAMPolicy.GetIamPolicy diff --git a/google/cloud/aiplatform/v1beta1/feature_online_store.proto b/google/cloud/aiplatform/v1beta1/feature_online_store.proto index b8b45a25b9b70d..c1609aabc7a7d4 100644 --- a/google/cloud/aiplatform/v1beta1/feature_online_store.proto +++ b/google/cloud/aiplatform/v1beta1/feature_online_store.proto @@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1beta1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/service_networking.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; @@ -60,12 +61,29 @@ message FeatureOnlineStore { AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED]; } - // The dedicated serving endpoint for this FeatureOnlineStore. + // Optimized storage type to replace lightning + message Optimized {} + + // 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. message DedicatedServingEndpoint { // Output only. This field will be populated with the domain name to use for // this FeatureOnlineStore string public_endpoint_domain_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Private service connect config. + // If + // [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1beta1.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 private_service_connect_config = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The name of the service attachment resource. Populated if + // private service connect is enabled and after FeatureViewSync is created. + string service_attachment = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Contains settings for embedding management. @@ -101,6 +119,13 @@ message FeatureOnlineStore { // to serve featureValues for all FeatureViews under this // FeatureOnlineStore. Bigtable bigtable = 8; + + // Contains settings for the Optimized store that will be created + // to serve featureValues for all FeatureViews under this + // FeatureOnlineStore. When choose Optimized storage type, need to set + // [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.enable_private_service_connect] + // to use private endpoint. Otherwise will use public endpoint by default. + Optimized optimized = 12; } // Output only. Name of the FeatureOnlineStore. Format: diff --git a/google/cloud/aiplatform/v1beta1/feature_registry_service.proto b/google/cloud/aiplatform/v1beta1/feature_registry_service.proto index 8df7fa8ab8e0b5..6492f9d5f876a1 100644 --- a/google/cloud/aiplatform/v1beta1/feature_registry_service.proto +++ b/google/cloud/aiplatform/v1beta1/feature_registry_service.proto @@ -112,7 +112,7 @@ service FeatureRegistryService { option (google.api.method_signature) = "parent,feature,feature_id"; option (google.longrunning.operation_info) = { response_type: "Feature" - metadata_type: "CreateRegistryFeatureOperationMetadata" + metadata_type: "CreateFeatureOperationMetadata" }; } diff --git a/google/cloud/aiplatform/v1beta1/prediction_service.proto b/google/cloud/aiplatform/v1beta1/prediction_service.proto index d837110b5a53b2..14a7bca2d4dc68 100644 --- a/google/cloud/aiplatform/v1beta1/prediction_service.proto +++ b/google/cloud/aiplatform/v1beta1/prediction_service.proto @@ -304,6 +304,16 @@ message ExplainRequest { // - Using different baselines for explaining the prediction results. ExplanationSpecOverride explanation_spec_override = 5; + // Optional. This field is the same as the one above, but supports multiple + // explanations to occur in parallel. The key can be any string. Each override + // will be run against the model, then its explanations will be grouped + // together. + // + // Note - these explanations are run **In Addition** to the default + // Explanation in the deployed model. + map concurrent_explanation_spec_override = 6 + [(google.api.field_behavior) = OPTIONAL]; + // If specified, this ExplainRequest will be served by the chosen // DeployedModel, overriding // [Endpoint.traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split]. @@ -313,6 +323,17 @@ message ExplainRequest { // Response message for // [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain]. message ExplainResponse { + // This message is a wrapper grouping Concurrent Explanations. + message ConcurrentExplanation { + // The explanations of the Model's + // [PredictResponse.predictions][google.cloud.aiplatform.v1beta1.PredictResponse.predictions]. + // + // It has the same number of elements as + // [instances][google.cloud.aiplatform.v1beta1.ExplainRequest.instances] to + // be explained. + repeated Explanation explanations = 1; + } + // The explanations of the Model's // [PredictResponse.predictions][google.cloud.aiplatform.v1beta1.PredictResponse.predictions]. // @@ -321,6 +342,10 @@ message ExplainResponse { // explained. repeated Explanation explanations = 1; + // This field stores the results of the explanations run in parallel with + // the default explanation strategy/method. + map concurrent_explanations = 4; + // ID of the Endpoint's DeployedModel that served this explanation. string deployed_model_id = 2; diff --git a/google/cloud/alloydb/v1/alloydb_v1.yaml b/google/cloud/alloydb/v1/alloydb_v1.yaml index 3fe53ae81b5ff6..0afa3b67d60937 100644 --- a/google/cloud/alloydb/v1/alloydb_v1.yaml +++ b/google/cloud/alloydb/v1/alloydb_v1.yaml @@ -56,19 +56,6 @@ documentation: permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. -backend: - rules: - - selector: 'google.cloud.alloydb.v1.AlloyDBAdmin.*' - deadline: 60.0 - - selector: google.cloud.location.Locations.GetLocation - deadline: 60.0 - - selector: google.cloud.location.Locations.ListLocations - deadline: 60.0 - - selector: 'google.iam.v1.IAMPolicy.*' - deadline: 60.0 - - selector: 'google.longrunning.Operations.*' - deadline: 60.0 - http: rules: - selector: google.cloud.location.Locations.GetLocation diff --git a/google/cloud/alloydb/v1/resources.proto b/google/cloud/alloydb/v1/resources.proto index 9e35537e936119..9042f00fab96aa 100644 --- a/google/cloud/alloydb/v1/resources.proto +++ b/google/cloud/alloydb/v1/resources.proto @@ -401,8 +401,8 @@ message Cluster { // instance IPs for this cluster will be created in the allocated range. The // range name must comply with RFC 1035. Specifically, the name must be 1-63 // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])?. - // Field name is intended to be consistent with CloudSQL. + // `[a-z]([-a-z0-9]*[a-z0-9])?`. + // Field name is intended to be consistent with Cloud SQL. string allocated_ip_range = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -835,7 +835,8 @@ message Instance { // Configuration for query insights. QueryInsightsInstanceConfig query_insights_config = 21; - // Read pool specific config. + // Read pool instance configuration. + // This is required if the value of instanceType is READ_POOL. ReadPoolConfig read_pool_config = 14; // Output only. The IP address for the Instance. diff --git a/google/cloud/alloydb/v1/service.proto b/google/cloud/alloydb/v1/service.proto index 5cb16a67981064..8c47a29b6ff765 100644 --- a/google/cloud/alloydb/v1/service.proto +++ b/google/cloud/alloydb/v1/service.proto @@ -1358,6 +1358,11 @@ message GenerateClientCertificateRequest { // Optional. The public key from the client. string public_key = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional hint to the endpoint to generate a client + // ceritificate that can be used by AlloyDB connectors to exchange additional + // metadata with the server after TLS handshake. + bool use_metadata_exchange = 6 [(google.api.field_behavior) = OPTIONAL]; } // Message returned by a GenerateClientCertificate operation. diff --git a/google/cloud/contactcenterinsights/v1/contact_center_insights.proto b/google/cloud/contactcenterinsights/v1/contact_center_insights.proto index f2075fa8f7864f..381e8a122bfd9f 100644 --- a/google/cloud/contactcenterinsights/v1/contact_center_insights.proto +++ b/google/cloud/contactcenterinsights/v1/contact_center_insights.proto @@ -155,6 +155,20 @@ service ContactCenterInsights { }; } + // Deletes multiple conversations in a single request. + rpc BulkDeleteConversations(BulkDeleteConversationsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/conversations:bulkDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,filter"; + option (google.longrunning.operation_info) = { + response_type: "BulkDeleteConversationsResponse" + metadata_type: "BulkDeleteConversationsMetadata" + }; + } + // Imports conversations and processes them according to the user's // configuration. rpc IngestConversations(IngestConversationsRequest) @@ -688,8 +702,23 @@ message DeleteConversationRequest { message IngestConversationsRequest { // Configuration for Cloud Storage bucket sources. message GcsSource { + enum BucketObjectType { + // The object type is unspecified and will default to TRANSCRIPT. + BUCKET_OBJECT_TYPE_UNSPECIFIED = 0; + + // The object is a transcript. + TRANSCRIPT = 1; + + // The object is an audio file. + AUDIO = 2; + } + // Required. The Cloud Storage bucket containing source objects. string bucket_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies the type of the objects in `bucket_uri`. + BucketObjectType bucket_object_type = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Configuration for processing transcript objects. @@ -703,6 +732,16 @@ message IngestConversationsRequest { // An opaque, user-specified string representing the human agent who handled // the conversations. string agent_id = 1; + + // Optional. For audio conversations, this field indicates which of the + // channels, 1 or 2, contains the agent. Note that this must be set for + // audio conversations to be properly displayed and analyzed. + int32 agent_channel = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. For audio conversations, this field indicates which of the + // channels, 1 or 2, contains the customer. Note that this must be set for + // audio conversations to be properly displayed and analyzed. + int32 customer_channel = 3 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for an external data store containing objects that will @@ -729,6 +768,14 @@ message IngestConversationsRequest { // Configuration that applies to all conversations. ConversationConfig conversation_config = 4; + + // Optional. DLP settings for transcript redaction. Optional, will default to + // the config specified in Settings. + RedactionConfig redaction_config = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Default Speech-to-Text configuration. Optional, will default to + // the config specified in Settings. + SpeechConfig speech_config = 6 [(google.api.field_behavior) = OPTIONAL]; } // The metadata for an IngestConversations operation. @@ -893,6 +940,11 @@ message BulkAnalyzeConversationsMetadata { // Total number of analyses requested. Computed by the number of conversations // returned by `filter` multiplied by `analysis_percentage` in the request. int32 total_requested_analyses_count = 6; + + // Output only. Partial errors during bulk analyze operation that might cause + // the operation output to be incomplete. + repeated google.rpc.Status partial_errors = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The response for a bulk analyze conversations operation. @@ -904,6 +956,50 @@ message BulkAnalyzeConversationsResponse { int32 failed_analysis_count = 2; } +// The request to delete conversations in bulk. +message BulkDeleteConversationsRequest { + // Required. The parent resource to create analyses in. + // Format: + // projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Filter used to select the subset of conversations to analyze. + string filter = 2; + + // Maximum number of conversations to delete. The default is 1000. It can be + // changed by setting the `max_delete_count` field. + int32 max_delete_count = 3; + + // If set to true, all of this conversation's analyses will also be deleted. + // Otherwise, the request will only succeed if the conversation has no + // analyses. + bool force = 4; +} + +// The metadata for a bulk delete conversations operation. +message BulkDeleteConversationsMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // The original request for bulk delete. + BulkDeleteConversationsRequest request = 3; + + // Partial errors during bulk delete conversations operation that might cause + // the operation output to be incomplete. + repeated google.rpc.Status partial_errors = 4; +} + +// The response for a bulk analyze conversations operation. +message BulkDeleteConversationsResponse {} + // The request to export insights. message ExportInsightsDataRequest { // A BigQuery Table Reference. diff --git a/google/cloud/contactcenterinsights/v1/contactcenterinsights_v1.yaml b/google/cloud/contactcenterinsights/v1/contactcenterinsights_v1.yaml index c01fd2f1838a9d..c83d6ba0a9d4f1 100644 --- a/google/cloud/contactcenterinsights/v1/contactcenterinsights_v1.yaml +++ b/google/cloud/contactcenterinsights/v1/contactcenterinsights_v1.yaml @@ -10,6 +10,8 @@ apis: types: - name: google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata - name: google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse +- name: google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata +- name: google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse - name: google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata - name: google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata - name: google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata diff --git a/google/cloud/contactcenterinsights/v1/resources.proto b/google/cloud/contactcenterinsights/v1/resources.proto index 5c5535ce7b714a..d5d9233e69df0b 100644 --- a/google/cloud/contactcenterinsights/v1/resources.proto +++ b/google/cloud/contactcenterinsights/v1/resources.proto @@ -1265,7 +1265,7 @@ message AnnotatorSelector { // Unspecified summarization model. SUMMARIZATION_MODEL_UNSPECIFIED = 0; - // The Insights baseline model. + // The CCAI baseline model. BASELINE_MODEL = 1; } diff --git a/google/cloud/datacatalog/lineage/v1/BUILD.bazel b/google/cloud/datacatalog/lineage/v1/BUILD.bazel index d3f9f22992e68a..7796a1835befe5 100644 --- a/google/cloud/datacatalog/lineage/v1/BUILD.bazel +++ b/google/cloud/datacatalog/lineage/v1/BUILD.bazel @@ -177,6 +177,10 @@ py_gapic_library( transport = "grpc+rest", deps = [ ], + opt_args = [ + "python-gapic-namespace=google.cloud", + "python-gapic-name=datacatalog_lineage", + ], ) py_test( diff --git a/google/cloud/datacatalog/lineage/v1/datalineage_v1.yaml b/google/cloud/datacatalog/lineage/v1/datalineage_v1.yaml index b18b677c57daa1..07d7ff8f3a3359 100644 --- a/google/cloud/datacatalog/lineage/v1/datalineage_v1.yaml +++ b/google/cloud/datacatalog/lineage/v1/datalineage_v1.yaml @@ -9,6 +9,7 @@ apis: types: - name: google.cloud.datacatalog.lineage.v1.OperationMetadata +- name: google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEventResponse http: rules: @@ -32,13 +33,3 @@ authentication: oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform - -publishing: - organization: CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED - new_issue_uri: '' - documentation_uri: '' - api_short_name: '' - github_label: '' - doc_tag_prefix: '' - codeowner_github_teams: - library_settings: diff --git a/google/cloud/datacatalog/lineage/v1/lineage.proto b/google/cloud/datacatalog/lineage/v1/lineage.proto index 1799cb045a1c75..3ec3ceed1446c0 100644 --- a/google/cloud/datacatalog/lineage/v1/lineage.proto +++ b/google/cloud/datacatalog/lineage/v1/lineage.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -43,6 +43,19 @@ service Lineage { option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Creates new lineage events together with their parents: process and run. + // Updates the process and run if they already exist. + // Mapped from Open Lineage specification: + // https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json. + rpc ProcessOpenLineageRunEvent(ProcessOpenLineageRunEventRequest) + returns (ProcessOpenLineageRunEventResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}:processOpenLineageRunEvent" + body: "open_lineage" + }; + option (google.api.method_signature) = "parent,open_lineage"; + } + // Creates a new process. rpc CreateProcess(CreateProcessRequest) returns (Process) { option (google.api.http) = { @@ -232,8 +245,11 @@ message Process { // or numbers, spaces or characters like `_-:&.` string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The attributes of the process. Can be anything, for example, - // "author". Up to 100 attributes are allowed. + // Optional. The attributes of the process. Should only be used for the + // purpose of non-semantic management (classifying, describing or labeling the + // process). + // + // Up to 100 attributes are allowed. map attributes = 3 [(google.api.field_behavior) = OPTIONAL]; @@ -280,8 +296,10 @@ message Run { // or numbers, spaces or characters like `_-:&.` string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The attributes of the run. Can be anything, for example, a string - // with an SQL request. Up to 100 attributes are allowed. + // Optional. The attributes of the run. Should only be used for the purpose of + // non-semantic management (classifying, describing or labeling the run). + // + // Up to 100 attributes are allowed. map attributes = 3 [(google.api.field_behavior) = OPTIONAL]; @@ -316,11 +334,11 @@ message LineageEvent { // Optional. List of source-target pairs. Can't contain more than 100 tuples. repeated EventLink links = 8 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The beginning of the transformation which resulted in this + // Required. The beginning of the transformation which resulted in this // lineage event. For streaming scenarios, it should be the beginning of the // period from which the lineage is being reported. google.protobuf.Timestamp start_time = 6 - [(google.api.field_behavior) = OPTIONAL]; + [(google.api.field_behavior) = REQUIRED]; // Optional. The end of the transformation which resulted in this lineage // event. For streaming scenarios, it should be the end of the period from @@ -340,16 +358,9 @@ message EventLink { // The soft reference to everything you can attach a lineage event to. message EntityReference { - // Required. Fully Qualified Name of the entity. Useful for referencing - // entities that aren't represented as GCP resources, for example, tables in - // Dataproc Metastore API. - // - // Examples: - // - // * `bigquery:dataset.project_id.dataset_id` - // * `bigquery:table.project_id.dataset_id.table_id` - // * `pubsub:project_id.topic_id` - // * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId` + // Required. [Fully Qualified Name + // (FQN)](https://cloud.google.com/data-catalog/docs/fully-qualified-names) + // of the entity. string fully_qualified_name = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -380,6 +391,9 @@ message OperationMetadata { // The resource deletion operation. DELETE = 1; + + // The resource creation operation. + CREATE = 2; } // Output only. The current operation state. @@ -406,6 +420,48 @@ message OperationMetadata { [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Request message for +// [ProcessOpenLineageRunEvent][google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEvent]. +message ProcessOpenLineageRunEventRequest { + // Required. The name of the project and its location that should own the + // process, run, and lineage event. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. OpenLineage message following OpenLineage format: + // https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json + google.protobuf.Struct open_lineage = 2 + [(google.api.field_behavior) = REQUIRED]; + + // A unique identifier for this request. Restricted to 36 ASCII characters. + // A random UUID is recommended. This request is idempotent only if a + // `request_id` is provided. + string request_id = 3; +} + +// Response message for +// [ProcessOpenLineageRunEvent][google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEvent]. +message ProcessOpenLineageRunEventResponse { + // Created process name. + // Format: `projects/{project}/locations/{location}/processes/{process}`. + string process = 1 [(google.api.resource_reference) = { + type: "datalineage.googleapis.com/Process" + }]; + + // Created run name. + // Format: + // `projects/{project}/locations/{location}/processes/{process}/runs/{run}`. + string run = 2 [ + (google.api.resource_reference) = { type: "datalineage.googleapis.com/Run" } + ]; + + // Created lineage event names. + // Format: + // `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`. + repeated string lineage_events = 3 [(google.api.resource_reference) = { + type: "datalineage.googleapis.com/LineageEvent" + }]; +} + // Request message for // [CreateProcess][google.cloud.datacatalog.lineage.v1.CreateProcess]. message CreateProcessRequest { @@ -542,6 +598,9 @@ message UpdateRunRequest { // The list of fields to update. Currently not used. The whole message is // updated. google.protobuf.FieldMask update_mask = 2; + + // If set to true and the run is not found, the request creates it. + bool allow_missing = 3; } // Request message for @@ -693,7 +752,7 @@ message DeleteLineageEventRequest { // Request message for // [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]. message SearchLinksRequest { - // Required. The project and location you want search in the format `projects/*/locations/*` + // Required. The project and location you want search in. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -769,7 +828,7 @@ message Link { // Request message for // [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses]. message BatchSearchLinkProcessesRequest { - // Required. The project and location you want search in the format `projects/*/locations/*` + // Required. The project and location where you want to search. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -861,9 +920,16 @@ message Origin { // Looker Studio LOOKER_STUDIO = 5; + + // Dataproc + DATAPROC = 6; } // Type of the source. + // + // Use of a source_type other than `CUSTOM` for process creation + // or updating is highly discouraged, and may be restricted in the future + // without notice. SourceType source_type = 1; // If the source_type isn't CUSTOM, the value of this field should be a GCP diff --git a/google/cloud/dataproc/v1/clusters.proto b/google/cloud/dataproc/v1/clusters.proto index 03a4e8d6006122..885b58ea85a498 100644 --- a/google/cloud/dataproc/v1/clusters.proto +++ b/google/cloud/dataproc/v1/clusters.proto @@ -20,9 +20,11 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dataproc/v1/operations.proto"; import "google/cloud/dataproc/v1/shared.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -693,6 +695,23 @@ message InstanceGroupConfig { // provisioning models. InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration to handle the startup of instances during cluster + // create and update process. + StartupConfig startup_config = 14 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration to handle the startup of instances during cluster create and +// update process. +message StartupConfig { + // Optional. The config setting to enable cluster creation/ updation to be + // successful only after required_registration_fraction of instances are up + // and running. This configuration is applicable to only secondary workers for + // now. The cluster will fail if required_registration_fraction of instances + // are not available. This will include instance creation, agent registration, + // and service registration (if enabled). + optional double required_registration_fraction = 1 + [(google.api.field_behavior) = OPTIONAL]; } // A reference to a Compute Engine instance. diff --git a/google/cloud/deploy/v1/BUILD.bazel b/google/cloud/deploy/v1/BUILD.bazel index 366929428a8e11..57da840ab744ac 100644 --- a/google/cloud/deploy/v1/BUILD.bazel +++ b/google/cloud/deploy/v1/BUILD.bazel @@ -21,6 +21,8 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "deploy_proto", srcs = [ + "automation_payload.proto", + "automationrun_payload.proto", "cloud_deploy.proto", "deliverypipeline_notification_payload.proto", "jobrun_notification_payload.proto", @@ -28,6 +30,7 @@ proto_library( "release_notification_payload.proto", "release_render_payload.proto", "rollout_notification_payload.proto", + "rollout_update_payload.proto", "target_notification_payload.proto", ], deps = [ diff --git a/google/cloud/deploy/v1/automation_payload.proto b/google/cloud/deploy/v1/automation_payload.proto new file mode 100644 index 00000000000000..8a3ca07410f35f --- /dev/null +++ b/google/cloud/deploy/v1/automation_payload.proto @@ -0,0 +1,41 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "AutomationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/automation" +// Platform Log event that describes the Automation related events. +message AutomationEvent { + // Debug message for when there is an update on the AutomationRun. + // Provides further details about the resource creation or state change. + string message = 1; + + // The name of the `AutomationRun`. + string automation = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 4; +} diff --git a/google/cloud/deploy/v1/automationrun_payload.proto b/google/cloud/deploy/v1/automationrun_payload.proto new file mode 100644 index 00000000000000..b34192ceb9d952 --- /dev/null +++ b/google/cloud/deploy/v1/automationrun_payload.proto @@ -0,0 +1,50 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "AutomationRunPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/automation_run" +// Platform Log event that describes the AutomationRun related events. +message AutomationRunEvent { + // Debug message for when there is an update on the AutomationRun. + // Provides further details about the resource creation or state change. + string message = 1; + + // The name of the `AutomationRun`. + string automation_run = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Identifier of the `Automation`. + string automation_id = 4; + + // Identifier of the `Automation` rule. + string rule_id = 5; + + // ID of the `Target` to which the `AutomationRun` is created. + string destination_target_id = 6; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 7; +} diff --git a/google/cloud/deploy/v1/cloud_deploy.proto b/google/cloud/deploy/v1/cloud_deploy.proto index b930b9a5b66556..c6e5782a37c17c 100644 --- a/google/cloud/deploy/v1/cloud_deploy.proto +++ b/google/cloud/deploy/v1/cloud_deploy.proto @@ -55,6 +55,10 @@ option (google.api.resource_definition) = { type: "run.googleapis.com/Service" pattern: "projects/{project}/locations/{location}/services/{service}" }; +option (google.api.resource_definition) = { + type: "run.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" +}; // CloudDeploy service creates and manages Continuous Delivery operations // on Google Cloud Platform via Skaffold (https://skaffold.dev). @@ -131,6 +135,15 @@ service CloudDeploy { option (google.api.method_signature) = "parent"; } + // Creates a `Rollout` to roll back the specified target. + rpc RollbackTarget(RollbackTargetRequest) returns (RollbackTargetResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget" + body: "*" + }; + option (google.api.method_signature) = "name,target_id,rollout_id"; + } + // Gets details of a single Target. rpc GetTarget(GetTargetRequest) returns (Target) { option (google.api.http) = { @@ -324,6 +337,94 @@ service CloudDeploy { }; option (google.api.method_signature) = "name"; } + + // Creates a new Automation in a given project and location. + rpc CreateAutomation(CreateAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + body: "automation" + }; + option (google.api.method_signature) = "parent,automation,automation_id"; + option (google.longrunning.operation_info) = { + response_type: "Automation" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Automation resource. + rpc UpdateAutomation(UpdateAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + body: "automation" + }; + option (google.api.method_signature) = "automation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Automation" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Automation resource. + rpc DeleteAutomation(DeleteAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Automation. + rpc GetAutomation(GetAutomationRequest) returns (Automation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Automations in a given project and location. + rpc ListAutomations(ListAutomationsRequest) + returns (ListAutomationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single AutomationRun. + rpc GetAutomationRun(GetAutomationRunRequest) returns (AutomationRun) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists AutomationRuns in a given project and location. + rpc ListAutomationRuns(ListAutomationRunsRequest) + returns (ListAutomationRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns" + }; + option (google.api.method_signature) = "parent"; + } + + // Cancels an AutomationRun. The `state` of the `AutomationRun` after + // cancelling is `CANCELLED`. `CancelAutomationRun` can be called on + // AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun + // in a different state returns an `FAILED_PRECONDITION` error. + rpc CancelAutomationRun(CancelAutomationRunRequest) + returns (CancelAutomationRunResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } } // A `DeliveryPipeline` resource in the Cloud Deploy API. @@ -336,8 +437,8 @@ message DeliveryPipeline { pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}" }; - // Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `DeliveryPipeline`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `DeliveryPipeline`. @@ -448,14 +549,14 @@ message Strategy { // Predeploy contains the predeploy job configuration information. message Predeploy { - // Optional. A sequence of skaffold custom actions to invoke during execution + // Optional. A sequence of Skaffold custom actions to invoke during execution // of the predeploy job. repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; } // Postdeploy contains the postdeploy job configuration information. message Postdeploy { - // Optional. A sequence of skaffold custom actions to invoke during execution + // Optional. A sequence of Skaffold custom actions to invoke during execution // of the postdeploy job. repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; } @@ -504,11 +605,11 @@ message CanaryDeployment { bool verify = 2; // Optional. Configuration for the predeploy job of the first phase. If this - // is not configured, predeploy job will not be present. + // is not configured, there will be no predeploy job for this phase. Predeploy predeploy = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration for the postdeploy job of the last phase. If this - // is not configured, postdeploy job will not be present. + // is not configured, there will be no postdeploy job for this phase. Postdeploy postdeploy = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -537,11 +638,11 @@ message CustomCanaryDeployment { bool verify = 4; // Optional. Configuration for the predeploy job of this phase. If this is - // not configured, predeploy job will not be present for this phase. + // not configured, there will be no predeploy job for this phase. Predeploy predeploy = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration for the postdeploy job of this phase. If this is - // not configured, postdeploy job will not be present for this phase. + // not configured, there will be no postdeploy job for this phase. Postdeploy postdeploy = 6 [(google.api.field_behavior) = OPTIONAL]; } @@ -641,7 +742,7 @@ message TargetsPresentCondition { bool status = 1; // The list of Target names that do not exist. For example, - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. repeated string missing_targets = 2 [(google.api.resource_reference) = { type: "clouddeploy.googleapis.com/Target" }]; @@ -678,7 +779,7 @@ message PipelineCondition { // The request object for `ListDeliveryPipelines`. message ListDeliveryPipelinesRequest { // Required. The parent, which owns this collection of pipelines. Format must - // be projects/{project_id}/locations/{location_name}. + // be `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -723,7 +824,7 @@ message ListDeliveryPipelinesResponse { // The request object for `GetDeliveryPipeline` message GetDeliveryPipelineRequest { // Required. Name of the `DeliveryPipeline`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -735,7 +836,8 @@ message GetDeliveryPipelineRequest { // The request object for `CreateDeliveryPipeline`. message CreateDeliveryPipelineRequest { // Required. The parent collection in which the `DeliveryPipeline` should be - // created. Format should be projects/{project_id}/locations/{location_name}. + // created. Format should be + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -811,7 +913,7 @@ message UpdateDeliveryPipelineRequest { // The request object for `DeleteDeliveryPipeline`. message DeleteDeliveryPipelineRequest { // Required. The name of the `DeliveryPipeline` to delete. Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -853,6 +955,58 @@ message DeleteDeliveryPipelineRequest { string etag = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Configs for the Rollback rollout. +message RollbackTargetConfig { + // Optional. The rollback `Rollout` to create. + Rollout rollout = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string starting_phase_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `RollbackTarget`. +message RollbackTargetRequest { + // Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `Target` that is being rolled back. + string target_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the rollback `Rollout` to create. + string rollout_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. ID of the `Release` to roll back to. If this isn't specified, the + // previous successful `Rollout` to the specified target will be used to + // determine the `Release`. + string release_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If provided, this must be the latest `Rollout` that is on the + // `Target`. + string rollout_to_roll_back = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configs for the rollback `Rollout`. + RollbackTargetConfig rollback_config = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with a `RollbackTargetResponse`. + bool validate_only = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `RollbackTarget`. +message RollbackTargetResponse { + // The config of the rollback `Rollout` created or will be created. + RollbackTargetConfig rollback_config = 1; +} + // A `Target` resource in the Cloud Deploy API. // // A `Target` defines a location to which a Skaffold configuration @@ -864,7 +1018,7 @@ message Target { }; // Optional. Name of the `Target`. Format is - // projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}. + // `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Resource id of the `Target`. @@ -1046,7 +1200,7 @@ message PrivatePool { // Information specifying a GKE Cluster. message GkeCluster { // Information specifying a GKE Cluster. Format is - // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}. + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. string cluster = 1 [(google.api.resource_reference) = { type: "container.googleapis.com/Cluster" }]; @@ -1093,7 +1247,7 @@ message MultiTarget { // The request object for `ListTargets`. message ListTargetsRequest { // Required. The parent, which owns this collection of targets. Format must be - // projects/{project_id}/locations/{location_name}. + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1139,7 +1293,7 @@ message ListTargetsResponse { // The request object for `GetTarget`. message GetTargetRequest { // Required. Name of the `Target`. Format must be - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1152,7 +1306,7 @@ message GetTargetRequest { message CreateTargetRequest { // Required. The parent collection in which the `Target` should be created. // Format should be - // projects/{project_id}/locations/{location_name}. + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1226,7 +1380,7 @@ message UpdateTargetRequest { // The request object for `DeleteTarget`. message DeleteTargetRequest { // Required. The name of the `Target` to delete. Format should be - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1263,6 +1417,22 @@ message DeleteTargetRequest { string etag = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Contains criteria for selecting Targets. Attributes provided must match the +// target resource in order for policy restrictions to apply. E.g. if id "prod" +// and labels "foo: bar" are given the target resource must match both that id +// and have that label in order to be selected. +message TargetAttribute { + // ID of the `Target`. The value of this field could be one of the + // following: + // * The last segment of a target name. It only needs the ID to determine + // which target is being referred to + // * "*", all targets in a location. + string id = 1; + + // Target labels. + map labels = 2; +} + // A `Release` resource in the Cloud Deploy API. // // A `Release` defines a specific Skaffold configuration instance @@ -1323,6 +1493,11 @@ message Release { // failure_message for additional details. CLOUD_BUILD_REQUEST_FAILED = 3; + // The render operation did not complete successfully because the + // verification stanza required for verify was not found on the skaffold + // configuration. + VERIFICATION_CONFIG_NOT_FOUND = 4; + // The render operation did not complete successfully because the custom // action required for predeploy or postdeploy was not found in the // skaffold configuration. See failure_message for additional details. @@ -1394,9 +1569,8 @@ message Release { SkaffoldSupportedCondition skaffold_supported_condition = 2; } - // Optional. Name of the `Release`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `Release`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `Release`. @@ -1551,7 +1725,7 @@ message DeployArtifact { // `Release` render. message CloudRunRenderMetadata { // Output only. The name of the Cloud Run Service in the rendered manifest. - // Format is projects/{project}/locations/{location}/services/{service}. + // Format is `projects/{project}/locations/{location}/services/{service}`. string service = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "run.googleapis.com/Service" } @@ -1614,7 +1788,7 @@ message ListReleasesResponse { // The request object for `GetRelease`. message GetReleaseRequest { // Required. Name of the `Release`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1627,7 +1801,7 @@ message GetReleaseRequest { message CreateReleaseRequest { // Required. The parent collection in which the `Release` should be created. // Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1756,9 +1930,8 @@ message Rollout { CLOUD_BUILD_REQUEST_FAILED = 7; } - // Optional. Name of the `Rollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `Rollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `Rollout`. @@ -1845,10 +2018,17 @@ message Rollout { // Output only. Metadata contains information about the rollout. Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Name of the `ControllerRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ControllerRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string controller_rollout = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the `Rollout` that is rolled back by this `Rollout`. + // Empty if this `Rollout` wasn't created as a rollback. + string rollback_of_rollout = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Names of `Rollouts` that rolled back this `Rollout`. + repeated string rolled_back_by_rollouts = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Metadata includes information associated with a `Rollout`. @@ -1856,6 +2036,11 @@ message Metadata { // Output only. The name of the Cloud Run Service that is associated with a // `Rollout`. CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AutomationRolloutMetadata contains the information about the + // interactions between Automation service and this rollout. + AutomationRolloutMetadata automation = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to @@ -1870,7 +2055,7 @@ message DeployJobRunMetadata { message CloudRunMetadata { // Output only. The name of the Cloud Run Service that is associated with a // `Rollout`. Format is - // projects/{project}/locations/{location}/services/{service}. + // `projects/{project}/locations/{location}/services/{service}`. string service = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "run.googleapis.com/Service" } @@ -1882,6 +2067,32 @@ message CloudRunMetadata { // Output only. The Cloud Run Revision id associated with a `Rollout`. string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Cloud Run job that is associated with a + // `Rollout`. Format is + // `projects/{project}/locations/{location}/jobs/{job_name}`. + string job = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } + ]; +} + +// AutomationRolloutMetadata contains Automation-related actions that +// were performed on a rollout. +message AutomationRolloutMetadata { + // Output only. The ID of the AutomationRun initiated by a promote release + // rule. + string promote_automation_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IDs of the AutomationRuns initiated by an advance rollout + // rule. + repeated string advance_automation_runs = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IDs of the AutomationRuns initiated by a repair rollout + // rule. + repeated string repair_automation_runs = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Phase represents a collection of jobs that are logically grouped together @@ -1941,12 +2152,10 @@ message DeploymentJobs { // Output only. The verify Job. Runs after a deploy if the deploy succeeds. Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The predeploy Job. This is the predeploy job in the phase. - // This is the first job of the phase. + // Output only. The predeploy Job, which is the first job on the phase. Job predeploy_job = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The postdeploy Job. This is the postdeploy job in the phase. - // This is the last job of the phase. + // Output only. The postdeploy Job, which is the last job on the phase. Job postdeploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -2109,7 +2318,7 @@ message ListRolloutsResponse { // GetRolloutRequest is the request object used by `GetRollout`. message GetRolloutRequest { // Required. Name of the `Rollout`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2122,7 +2331,7 @@ message GetRolloutRequest { message CreateRolloutRequest { // Required. The parent collection in which the `Rollout` should be created. // Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2193,8 +2402,7 @@ message OperationMetadata { // The request object used by `ApproveRollout`. message ApproveRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2212,8 +2420,7 @@ message ApproveRolloutResponse {} // The request object used by `AdvanceRollout`. message AdvanceRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2231,8 +2438,7 @@ message AdvanceRolloutResponse {} // The request object used by `CancelRollout`. message CancelRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2247,8 +2453,7 @@ message CancelRolloutResponse {} // The request object used by `IgnoreJob`. message IgnoreJobRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string rollout = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2269,8 +2474,7 @@ message IgnoreJobResponse {} // RetryJobRequest is the request object used by `RetryJob`. message RetryJobRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string rollout = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2291,8 +2495,7 @@ message RetryJobResponse {} // The request object used by `AbandonRelease`. message AbandonReleaseRequest { // Required. Name of the Release. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2335,9 +2538,7 @@ message JobRun { } // Optional. Name of the `JobRun`. Format is - // projects/{project}/locations/{location}/ - // deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/ - // {rollouts}/jobRuns/{uuid}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `JobRun`. @@ -2412,7 +2613,7 @@ message DeployJobRun { // logs. EXECUTION_FAILED = 2; - // The deploy build did not complete within the alloted time. + // The deploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // There were missing resources in the runtime environment required for a @@ -2426,7 +2627,7 @@ message DeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to deploy. Format is - // projects/{project}/locations/{location}/builds/{build}. + // `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2464,7 +2665,7 @@ message VerifyJobRun { // logs. EXECUTION_FAILED = 2; - // The verify build did not complete within the alloted time. + // The verify job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // No Skaffold verify configuration was found. @@ -2477,7 +2678,7 @@ message VerifyJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to verify. Format is - // projects/{project}/locations/{location}/builds/{build}. + // `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2517,7 +2718,7 @@ message PredeployJobRun { // logs. EXECUTION_FAILED = 2; - // The predeploy build did not complete within the alloted time. + // The predeploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message @@ -2527,7 +2728,7 @@ message PredeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to execute the custom actions associated with the predeploy Job. - // Format is projects/{project}/locations/{location}/builds/{build}. + // Format is `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2560,7 +2761,7 @@ message PostdeployJobRun { // logs. EXECUTION_FAILED = 2; - // The postdeploy build did not complete within the alloted time. + // The postdeploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message @@ -2570,7 +2771,7 @@ message PostdeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to execute the custom actions associated with the postdeploy Job. - // Format is projects/{project}/locations/{location}/builds/{build}. + // Format is `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2590,9 +2791,8 @@ message PostdeployJobRun { // CreateChildRolloutJobRun contains information specific to a // createChildRollout `JobRun`. message CreateChildRolloutJobRun { - // Output only. Name of the `ChildRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ChildRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The ID of the childRollout Phase initiated by this JobRun. @@ -2602,9 +2802,8 @@ message CreateChildRolloutJobRun { // AdvanceChildRolloutJobRun contains information specific to a // advanceChildRollout `JobRun`. message AdvanceChildRolloutJobRun { - // Output only. Name of the `ChildRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ChildRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. the ID of the ChildRollout's Phase. @@ -2659,7 +2858,7 @@ message ListJobRunsResponse { // GetJobRunRequest is the request object used by `GetJobRun`. message GetJobRunRequest { // Required. Name of the `JobRun`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2671,8 +2870,7 @@ message GetJobRunRequest { // The request object used by `TerminateJobRun`. message TerminateJobRunRequest { // Required. Name of the `JobRun`. Format must be - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2728,6 +2926,706 @@ message GetConfigRequest { ]; } +// An `Automation` resource in the Cloud Deploy API. +// +// An `Automation` enables the automation of manually driven actions for +// a Delivery Pipeline, which includes Release promotion amongst Targets, +// Rollout repair and Rollout deployment strategy advancement. The intention +// of Automation is to reduce manual intervention in the continuous delivery +// process. +message Automation { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Automation" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}" + style: DECLARATIVE_FRIENDLY + }; + + // Output only. Name of the `Automation`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier of the `Automation`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the `Automation`. Max length is 255 characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time at which the automation was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the automation was updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User annotations. These attributes can only be set and used by + // the user, and not by Cloud Deploy. Annotations must meet the following + // constraints: + // + // * Annotations are key/value pairs. + // * Valid annotation keys have two segments: an optional prefix and name, + // separated by a slash (`/`). + // * The name segment is required and must be 63 characters or less, + // beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with + // dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between. + // * The prefix is optional. If specified, the prefix must be a DNS subdomain: + // a series of DNS labels separated by dots(`.`), not longer than 253 + // characters in total, followed by a slash (`/`). + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set + // for more details. + map annotations = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels are attributes that can be set and used by both the + // user and by Cloud Deploy. Labels must meet the following constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 63 characters. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag of the `Automation` resource. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When Suspended, automation is deactivated from execution. + bool suspended = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Email address of the user-managed IAM service account that + // creates Cloud Deploy release and rollout resources. + string service_account = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. Selected resources to which the automation will be applied. + AutomationResourceSelector selector = 11 + [(google.api.field_behavior) = REQUIRED]; + + // Required. List of Automation rules associated with the Automation resource. + // Must have at least one rule and limited to 250 rules per Delivery Pipeline. + // Note: the order of the rules here is not the same as the order of + // execution. + repeated AutomationRule rules = 14 [(google.api.field_behavior) = REQUIRED]; +} + +// AutomationResourceSelector contains the information to select the resources +// to which an Automation is going to be applied. +message AutomationResourceSelector { + // Contains attributes about a target. + repeated TargetAttribute targets = 1; +} + +// `AutomationRule` defines the automation activities. +message AutomationRule { + // The configuration of the Automation rule. + oneof rule { + // Optional. `PromoteReleaseRule` will automatically promote a release from + // the current target to a specified target. + PromoteReleaseRule promote_release_rule = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `AdvanceRolloutRule` will automatically advance a + // successful Rollout. + AdvanceRolloutRule advance_rollout_rule = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `RepairRolloutRule` will automatically repair a failed + // rollout. + RepairRolloutRule repair_rollout_rule = 3 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// `PromoteRelease` rule will automatically promote a release from the current +// target to a specified target. +message PromoteReleaseRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long the release need to be paused until being promoted to + // the next target. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the stage in the pipeline to which this `Release` is + // deploying. If unspecified, default it to the next stage in the promotion + // flow. The value of this field could be one of the following: + // * The last segment of a target name. It only needs the ID to determine + // if the target is one of the stages in the promotion sequence defined + // in the pipeline. + // * "@next", the next target in the promotion sequence. + string destination_target_id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information around the state of the Automation rule. + AutomationRuleCondition condition = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The starting phase of the rollout created by this operation. + // Default to the first phase. + string destination_phase = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// The `AdvanceRollout` automation rule will automatically advance a successful +// Rollout to the next phase. +message AdvanceRolloutRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Proceeds only after phase name matched any one in the list. + // This value must consist of lower-case letters, numbers, and hyphens, + // start with a letter and end with a letter or a number, and have a max + // length of 63 characters. In other words, it must match the following + // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string source_phases = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. How long to wait after a rollout is finished. + google.protobuf.Duration wait = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information around the state of the Automation rule. + AutomationRuleCondition condition = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The `RepairRolloutRule` automation rule will automatically repair a failed +// `Rollout`. +message RepairRolloutRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Phases within which jobs are subject to automatic repair actions + // on failure. Proceeds only after phase name matched any one in the list, or + // for all phases if unspecified. This value must consist of lower-case + // letters, numbers, and hyphens, start with a letter and end with a letter or + // a number, and have a max length of 63 characters. In other words, it must + // match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string source_phases = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Jobs to repair. Proceeds only after job name matched any one in + // the list, or for all jobs if unspecified or empty. The phase that includes + // the job must match the phase ID specified in `source_phase`. This value + // must consist of lower-case letters, numbers, and hyphens, start with a + // letter and end with a letter or a number, and have a max length of 63 + // characters. In other words, it must match the following regex: + // `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string jobs = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Defines the types of automatic repair actions for failed jobs. + repeated RepairMode repair_modes = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Information around the state of the 'Automation' rule. + AutomationRuleCondition condition = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration of the repair action. +message RepairMode { + // The repair action to perform. + oneof mode { + // Optional. Retries a failed job. + Retry retry = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rolls back a `Rollout`. + Rollback rollback = 2 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Retries the failed job. +message Retry { + // Required. Total number of retries. Retry will skipped if set to 0; The + // minimum value is 1, and the maximum value is 10. + int64 attempts = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long to wait for the first retry. Default is 0, and the + // maximum value is 14d. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The pattern of how wait time will be increased. Default is + // linear. Backoff mode will be ignored if `wait` is 0. + BackoffMode backoff_mode = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Rolls back a `Rollout`. +message Rollback { + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string destination_phase = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// `AutomationRuleCondition` contains conditions relevant to an +// `Automation` rule. +message AutomationRuleCondition { + // Optional. Details around targets enumerated in the rule. + TargetsPresentCondition targets_present_condition = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `CreateAutomation`. +message CreateAutomationRequest { + // Required. The parent collection in which the `Automation` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // Required. ID of the `Automation`. + string automation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Automation` to create. + Automation automation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateAutomation`. +message UpdateAutomationRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Automation` resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Automation` to update. + Automation automation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `Automation` that does not exist will + // result in the creation of a new `Automation`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteAutomation`. +message DeleteAutomationRequest { + // Required. The name of the `Automation` to delete. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // `Automation` will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and verify whether the resource + // exists, but do not actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag of the request. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `ListAutomations`. +message ListAutomationsRequest { + // Required. The parent, which owns this collection of automations. Format + // must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // The maximum number of automations to return. The service may return + // fewer than this value. If unspecified, at most 50 automations will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListAutomations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter automations to be returned. All fields can be used in the + // filter. + string filter = 4; + + // Field to sort by. + string order_by = 5; +} + +// The response object from `ListAutomations`. +message ListAutomationsResponse { + // The `Automations` objects. + repeated Automation automations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetAutomation` +message GetAutomationRequest { + // Required. Name of the `Automation`. Format must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Automation" + } + ]; +} + +// An `AutomationRun` resource in the Cloud Deploy API. +// +// An `AutomationRun` represents an automation execution instance of an +// automation rule. +message AutomationRun { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/AutomationRun" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}" + }; + + // Valid state of an `AutomationRun`. + enum State { + // The `AutomationRun` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `AutomationRun` has succeeded. + SUCCEEDED = 1; + + // The `AutomationRun` was cancelled. + CANCELLED = 2; + + // The `AutomationRun` has failed. + FAILED = 3; + + // The `AutomationRun` is in progress. + IN_PROGRESS = 4; + + // The `AutomationRun` is pending. + PENDING = 5; + } + + // Output only. Name of the `AutomationRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `AutomationRun` was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the automationRun was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The weak etag of the `AutomationRun` resource. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the user-managed IAM service account that + // performs the operations against Cloud Deploy resources. + string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the Automation taken at AutomationRun creation + // time. + Automation automation_snapshot = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the target that represents the promotion stage that + // initiates the `AutomationRun`. The value of this field is the last segment + // of a target name. + string target_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the `AutomationRun`. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explains the current state of the `AutomationRun`. Present + // only an explanation is needed. + string state_description = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the `AutomationRun` will expire. An `AutomationRun` will + // expire after 14 days from its creation date. + google.protobuf.Timestamp expire_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the automation rule that initiated the operation. + string rule_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the automation that initiated the operation. + string automation_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The operation that the `AutomationRun` will perform. + oneof operation { + // Output only. Promotes a release to a specified 'Target'. + PromoteReleaseOperation promote_release_operation = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Advances a rollout to the next phase. + AdvanceRolloutOperation advance_rollout_operation = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Repairs a failed 'Rollout'. + RepairRolloutOperation repair_rollout_operation = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Earliest time the `AutomationRun` will attempt to resume. + // Wait-time is configured by `wait` in automation rule. + google.protobuf.Timestamp wait_until_time = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information of an automated promote-release operation. +message PromoteReleaseOperation { + // Output only. The ID of the target that represents the promotion stage to + // which the release will be promoted. The value of this field is the last + // segment of a target name. + string target_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The starting phase of the rollout created by this operation. + string phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information of an automated advance-rollout operation. +message AdvanceRolloutOperation { + // Output only. The phase of a deployment that initiated the operation. + string source_phase = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phase to which the rollout will be advanced to. + string destination_phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information for an automated `repair rollout` operation. +message RepairRolloutOperation { + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The index of the current repair action in the repair sequence. + int64 current_repair_mode_index = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Records of the repair attempts. Each repair phase may have + // multiple retry attempts or single rollback attempt. + repeated RepairPhase repair_phases = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RepairPhase tracks the repair attempts that have been made for +// each `RepairMode` specified in the `Automation` resource. +message RepairPhase { + oneof repair_phase { + // Output only. Records of the retry attempts for retry repair mode. + RetryPhase retry = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Rollback attempt for rollback repair mode . + RollbackAttempt rollback = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// RetryPhase contains the retry attempts and the metadata for initiating a +// new attempt. +message RetryPhase { + // Output only. The number of attempts that have been made. + int64 total_attempts = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pattern of how the wait time of the retry attempt is + // calculated. + BackoffMode backoff_mode = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phase ID of the phase that includes the job being retried. + string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The job ID for the Job to retry. + string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detail of a retry action. + repeated RetryAttempt attempts = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RetryAttempt represents an action of retrying the failed Cloud Deploy job. +message RetryAttempt { + // Output only. The index of this retry attempt. + int64 attempt = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Valid state of this retry action. + RepairState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the state of the Retry. + string state_desc = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'. +message RollbackAttempt { + // Output only. The phase to which the rollout will be rolled back to. + string destination_phase = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the rollback `Rollout` to create. + string rollout_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Valid state of this rollback action. + RepairState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the state of the Rollback. + string state_desc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object for `ListAutomationRuns`. +message ListAutomationRunsRequest { + // Required. The parent, which owns this collection of automationRuns. Format + // must be + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; + + // The maximum number of automationRuns to return. The service may return + // fewer than this value. If unspecified, at most 50 automationRuns will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListAutomationRuns` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter automationRuns to be returned. All fields can be used in the + // filter. + string filter = 4; + + // Field to sort by. + string order_by = 5; +} + +// The response object from `ListAutomationRuns`. +message ListAutomationRunsResponse { + // The `AutomationRuns` objects. + repeated AutomationRun automation_runs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetAutomationRun` +message GetAutomationRunRequest { + // Required. Name of the `AutomationRun`. Format must be + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; +} + +// The request object used by `CancelAutomationRun`. +message CancelAutomationRunRequest { + // Required. Name of the `AutomationRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; +} + +// The response object from `CancelAutomationRun`. +message CancelAutomationRunResponse {} + // The support state of a specific Skaffold version. enum SkaffoldSupportState { // Default value. This value is unused. @@ -2742,3 +3640,39 @@ enum SkaffoldSupportState { // This skaffold version is no longer supported. SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3; } + +// The pattern of how wait time is increased. +enum BackoffMode { + // No WaitMode is specified. + BACKOFF_MODE_UNSPECIFIED = 0; + + // Increases the wait time linearly. + BACKOFF_MODE_LINEAR = 1; + + // Increases the wait time exponentially. + BACKOFF_MODE_EXPONENTIAL = 2; +} + +// Valid state of a repair attempt. +enum RepairState { + // The `repair` has an unspecified state. + REPAIR_STATE_UNSPECIFIED = 0; + + // The `repair` action has succeeded. + REPAIR_STATE_SUCCEEDED = 1; + + // The `repair` action was cancelled. + REPAIR_STATE_CANCELLED = 2; + + // The `repair` action has failed. + REPAIR_STATE_FAILED = 3; + + // The `repair` action is in progress. + REPAIR_STATE_IN_PROGRESS = 4; + + // The `repair` action is pending. + REPAIR_STATE_PENDING = 5; + + // The `repair` action was skipped. + REPAIR_STATE_SKIPPED = 6; +} diff --git a/google/cloud/deploy/v1/clouddeploy_grpc_service_config.json b/google/cloud/deploy/v1/clouddeploy_grpc_service_config.json index 048ddce8356403..16b2868ac4808f 100644 --- a/google/cloud/deploy/v1/clouddeploy_grpc_service_config.json +++ b/google/cloud/deploy/v1/clouddeploy_grpc_service_config.json @@ -45,6 +45,22 @@ { "service": "google.cloud.deploy.v1.CloudDeploy", "method": "GetConfig" + }, + { + "service": "google.cloud.deploy.v1.CloudDeploy", + "method": "ListAutomationRuns" + }, + { + "service": "google.cloud.deploy.v1.CloudDeploy", + "method": "GetAutomationRun" + }, + { + "service": "google.cloud.deploy.v1.CloudDeploy", + "method": "ListAutomations" + }, + { + "service": "google.cloud.deploy.v1.CloudDeploy", + "method": "GetAutomation" } ], "timeout": "60s", @@ -52,7 +68,9 @@ "initialBackoff": "1s", "maxBackoff": "60s", "backoffMultiplier": 1.3, - "retryableStatusCodes": ["UNAVAILABLE"] + "retryableStatusCodes": [ + "UNAVAILABLE" + ] } }, { @@ -116,6 +134,22 @@ { "service": "google.cloud.deploy.v1.CloudDeploy", "method": "TerminateJobRun" + }, + { + "service": "google.cloud.deploy.v1.CloudDeploy", + "method": "CancelAutomationRun" + }, + { + "service": "google.cloud.deploy.v1.CloudDeploy", + "method": "DeleteAutomation" + }, + { + "service": "google.cloud.deploy.v1.CloudDeploy", + "method": "UpdateAutomation" + }, + { + "service": "google.cloud.deploy.v1.CloudDeploy", + "method": "CreateAutomation" } ], "timeout": "60s" diff --git a/google/cloud/deploy/v1/clouddeploy_v1.yaml b/google/cloud/deploy/v1/clouddeploy_v1.yaml index 129a1c5f40eabd..77df4d49a0e3ab 100644 --- a/google/cloud/deploy/v1/clouddeploy_v1.yaml +++ b/google/cloud/deploy/v1/clouddeploy_v1.yaml @@ -10,6 +10,8 @@ apis: - name: google.longrunning.Operations types: +- name: google.cloud.deploy.v1.AutomationEvent +- name: google.cloud.deploy.v1.AutomationRunEvent - name: google.cloud.deploy.v1.DeliveryPipelineNotificationEvent - name: google.cloud.deploy.v1.JobRunNotificationEvent - name: google.cloud.deploy.v1.OperationMetadata @@ -50,19 +52,6 @@ documentation: permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. -backend: - rules: - - selector: 'google.cloud.deploy.v1.CloudDeploy.*' - deadline: 60.0 - - selector: google.cloud.location.Locations.GetLocation - deadline: 60.0 - - selector: google.cloud.location.Locations.ListLocations - deadline: 60.0 - - selector: 'google.iam.v1.IAMPolicy.*' - deadline: 60.0 - - selector: 'google.longrunning.Operations.*' - deadline: 60.0 - http: rules: - selector: google.cloud.location.Locations.GetLocation diff --git a/google/cloud/deploy/v1/release_render_payload.proto b/google/cloud/deploy/v1/release_render_payload.proto index b679895254b753..0329689960a930 100644 --- a/google/cloud/deploy/v1/release_render_payload.proto +++ b/google/cloud/deploy/v1/release_render_payload.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.deploy.v1; +import "google/cloud/deploy/v1/cloud_deploy.proto"; + option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; option java_multiple_files = true; option java_outer_classname = "ReleaseRenderPayloadProto"; @@ -28,6 +30,9 @@ message ReleaseRenderEvent { // details as rendering progresses through render states. string message = 1; - // The name of the `Release`. + // The name of the release. string release = 2; + + // The state of the release render. + Release.RenderState release_render_state = 3; } diff --git a/google/cloud/deploy/v1/rollout_update_payload.proto b/google/cloud/deploy/v1/rollout_update_payload.proto index 4b26cb6d8234e3..5da1f453375ed2 100644 --- a/google/cloud/deploy/v1/rollout_update_payload.proto +++ b/google/cloud/deploy/v1/rollout_update_payload.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.deploy.v1; -import "google/api/field_behavior.proto"; import "google/cloud/deploy/v1/log_enums.proto"; option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; @@ -84,9 +83,8 @@ message RolloutUpdateEvent { // ID of the target. string target_id = 4; - // Output only. The type of the rollout update. - RolloutUpdateType rollout_update_type = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // The type of the rollout update. + RolloutUpdateType rollout_update_type = 5; // Debug message for when a rollout update event occurs. string message = 6; diff --git a/google/cloud/documentai/v1/document_io.proto b/google/cloud/documentai/v1/document_io.proto index 326fdb5ca62da9..26637a166a1fe4 100644 --- a/google/cloud/documentai/v1/document_io.proto +++ b/google/cloud/documentai/v1/document_io.proto @@ -124,8 +124,8 @@ message OcrConfig { // Configurations for premium OCR features. message PremiumFeatures { - // Turn on selection mark detector in OCR engine. Only available in OCR 2.0+ - // processors. + // Turn on selection mark detector in OCR engine. Only available in OCR 2.0 + // (and later) processors. bool enable_selection_mark_detection = 3; // Turn on font identification model and return font style information. @@ -166,7 +166,7 @@ message OcrConfig { bool compute_style_info = 8 [deprecated = true]; // Turn off character box detector in OCR engine. Character box detection is - // enabled by default in OCR 2.0+ processors. + // enabled by default in OCR 2.0 (and later) processors. bool disable_character_boxes_detection = 10; // Configurations for premium OCR features. diff --git a/google/cloud/documentai/v1/document_processor_service.proto b/google/cloud/documentai/v1/document_processor_service.proto index 6d77bd9384c012..53f516de954659 100644 --- a/google/cloud/documentai/v1/document_processor_service.proto +++ b/google/cloud/documentai/v1/document_processor_service.proto @@ -334,17 +334,19 @@ message ProcessOptions { repeated int32 pages = 1 [(google.api.field_behavior) = OPTIONAL]; } - // A subset of pages to process. If not specified, all pages will be - // processed. NOTICE: If any of the page range is set, we will extract and - // process only the given pages from the document. In the output document, - // the page_number is referring to the page number in the original document. - // This config only applies to sync requests. + // A subset of pages to process. If not specified, all pages are processed. + // If a page range is set, only the given pages are extracted and processed + // from the document. In the output document, + // [Document.Page.page_number][google.cloud.documentai.v1.Document.Page.page_number] + // refers to the page number in the original document. This configuration + // only applies to sync requests. `page_range` can be only one of the + // following: oneof page_range { // Which pages to process (1-indexed). IndividualPageSelector individual_page_selector = 5; - // Only process certain pages from the start, process all if the document - // has less pages. + // Only process certain pages from the start. Process all if the document + // has fewer pages. int32 from_start = 6; // Only process certain pages from the end, same as above. diff --git a/google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment_v1.yaml b/google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment_v1.yaml index de0b03938cefc3..5e6c8e8d7b046a 100644 --- a/google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment_v1.yaml +++ b/google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment_v1.yaml @@ -22,17 +22,6 @@ documentation: - selector: google.cloud.location.Locations.ListLocations description: Lists information about the supported locations for this service. -backend: - rules: - - selector: google.cloud.location.Locations.GetLocation - deadline: 60.0 - - selector: google.cloud.location.Locations.ListLocations - deadline: 60.0 - - selector: 'google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessment.*' - deadline: 60.0 - - selector: 'google.longrunning.Operations.*' - deadline: 60.0 - http: rules: - selector: google.cloud.location.Locations.GetLocation diff --git a/google/cloud/redis/cluster/v1/BUILD.bazel b/google/cloud/redis/cluster/v1/BUILD.bazel index 86874a338eb1bd..8dbd77296ef738 100644 --- a/google/cloud/redis/cluster/v1/BUILD.bazel +++ b/google/cloud/redis/cluster/v1/BUILD.bazel @@ -181,6 +181,10 @@ py_gapic_library( transport = "grpc+rest", deps = [ ], + opt_args = [ + "python-gapic-namespace=google.cloud", + "python-gapic-name=redis_cluster", + ], ) py_test( diff --git a/google/cloud/redis/cluster/v1beta1/BUILD.bazel b/google/cloud/redis/cluster/v1beta1/BUILD.bazel index 2da46d58f127eb..8a1eabbad16137 100644 --- a/google/cloud/redis/cluster/v1beta1/BUILD.bazel +++ b/google/cloud/redis/cluster/v1beta1/BUILD.bazel @@ -181,6 +181,10 @@ py_gapic_library( transport = "grpc+rest", deps = [ ], + opt_args = [ + "python-gapic-namespace=google.cloud", + "python-gapic-name=redis_cluster", + ], ) py_test( diff --git a/google/cloud/speech/v1/cloud_speech.proto b/google/cloud/speech/v1/cloud_speech.proto index 94cfd612624246..7a74e6a3230e72 100644 --- a/google/cloud/speech/v1/cloud_speech.proto +++ b/google/cloud/speech/v1/cloud_speech.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -260,6 +260,12 @@ message RecognitionConfig { // wideband is supported. `sample_rate_hertz` must be 16000. SPEEX_WITH_HEADER_BYTE = 7; + // MP3 audio. MP3 encoding is a Beta feature and only available in + // v1p1beta1. Support all standard MP3 bitrates (which range from 32-320 + // kbps). When using this encoding, `sample_rate_hertz` has to match the + // sample rate of the file being used. + MP3 = 8; + // Opus encoded audio frames in WebM container // ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be // one of 8000, 12000, 16000, 24000, or 48000. @@ -343,6 +349,13 @@ message RecognitionConfig { // When speech adaptation is set it supersedes the `speech_contexts` field. SpeechAdaptation adaptation = 20; + // Optional. Use transcription normalization to automatically replace parts of + // the transcript with phrases of your choosing. For StreamingRecognize, this + // normalization only applies to stable partial transcripts (stability > 0.8) + // and final transcripts. + TranscriptNormalization transcript_normalization = 24 + [(google.api.field_behavior) = OPTIONAL]; + // Array of [SpeechContext][google.cloud.speech.v1.SpeechContext]. // A means to provide context to assist the speech recognition. For more // information, see @@ -463,8 +476,8 @@ message RecognitionConfig { // Config to enable speaker diarization. message SpeakerDiarizationConfig { // If 'true', enables speaker detection for each recognized word in - // the top alternative of the recognition result using a speaker_tag provided - // in the WordInfo. + // the top alternative of the recognition result using a speaker_label + // provided in the WordInfo. bool enable_speaker_diarization = 1; // Minimum number of speakers in the conversation. This range gives you more @@ -956,9 +969,19 @@ message WordInfo { // Output only. A distinct integer value is assigned for every speaker within // the audio. This field specifies which one of those speakers was detected to // have spoken this word. Value ranges from '1' to diarization_speaker_count. - // speaker_tag is set if enable_speaker_diarization = 'true' and only in the + // speaker_tag is set if enable_speaker_diarization = 'true' and only for the // top alternative. - int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Note: Use speaker_label instead. + int32 speaker_tag = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A label value assigned for every unique speaker within the + // audio. This field specifies which speaker was detected to have spoken this + // word. For some models, like medical_conversation this can be actual speaker + // role, for example "patient" or "provider", but generally this would be a + // number identifying a speaker. This field is only set if + // enable_speaker_diarization = 'true' and only for the top alternative. + string speaker_label = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Information on speech adaptation use in results diff --git a/google/cloud/speech/v1/resource.proto b/google/cloud/speech/v1/resource.proto index fcfd4640a2ab74..d37c11baa88ab1 100644 --- a/google/cloud/speech/v1/resource.proto +++ b/google/cloud/speech/v1/resource.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -147,3 +147,27 @@ message SpeechAdaptation { // See specifications: https://www.w3.org/TR/speech-grammar ABNFGrammar abnf_grammar = 4; } + +// Transcription normalization configuration. Use transcription normalization +// to automatically replace parts of the transcript with phrases of your +// choosing. For StreamingRecognize, this normalization only applies to stable +// partial transcripts (stability > 0.8) and final transcripts. +message TranscriptNormalization { + // A single replacement configuration. + message Entry { + // What to replace. Max length is 100 characters. + string search = 1; + + // What to replace with. Max length is 100 characters. + string replace = 2; + + // Whether the search is case sensitive. + bool case_sensitive = 3; + } + + // A list of replacement entries. We will perform replacement with one entry + // at a time. For example, the second entry in ["cat" => "dog", "mountain cat" + // => "mountain dog"] will never be applied because we will always process the + // first entry before it. At most 100 entries. + repeated Entry entries = 1; +} diff --git a/google/container/v1/cluster_service.proto b/google/container/v1/cluster_service.proto index 294939bcd504cc..f2a770c9520a43 100644 --- a/google/container/v1/cluster_service.proto +++ b/google/container/v1/cluster_service.proto @@ -1975,6 +1975,9 @@ message Cluster { // Beta APIs Config K8sBetaAPIConfig enable_k8s_beta_apis = 143; + + // GKE Enterprise Configuration. + EnterpriseConfig enterprise_config = 149; } // K8sBetaAPIConfig , configuration for beta APIs @@ -5288,3 +5291,22 @@ message ResourceManagerTags { // 3. `{project_id}/{tag_key_name}={tag_value_name}` map tags = 1; } + +// EnterpriseConfig is the cluster enterprise configuration. +message EnterpriseConfig { + // Premium tiers for GKE Cluster. + enum ClusterTier { + // CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set. + CLUSTER_TIER_UNSPECIFIED = 0; + + // STANDARD indicates a standard GKE cluster. + STANDARD = 1; + + // ENTERPRISE indicates a GKE Enterprise cluster. + ENTERPRISE = 2; + } + + // Output only. [Output only] cluster_tier specifies the premium tier of the + // cluster. + ClusterTier cluster_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/google/container/v1beta1/cluster_service.proto b/google/container/v1beta1/cluster_service.proto index 843adc510d5b3d..8dd58acded25fc 100644 --- a/google/container/v1beta1/cluster_service.proto +++ b/google/container/v1beta1/cluster_service.proto @@ -2270,6 +2270,9 @@ message Cluster { // Enable/Disable Security Posture API features for the cluster. SecurityPostureConfig security_posture_config = 145; + + // GKE Enterprise Configuration. + EnterpriseConfig enterprise_config = 149; } // Kubernetes open source beta apis enabled on the cluster. @@ -5864,6 +5867,25 @@ message ResourceManagerTags { map tags = 1; } +// EnterpriseConfig is the cluster enterprise configuration. +message EnterpriseConfig { + // Premium tiers for GKE Cluster. + enum ClusterTier { + // CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set. + CLUSTER_TIER_UNSPECIFIED = 0; + + // STANDARD indicates a standard GKE cluster. + STANDARD = 1; + + // ENTERPRISE indicates a GKE Enterprise cluster. + ENTERPRISE = 2; + } + + // Output only. [Output only] cluster_tier specifies the premium tier of the + // cluster. + ClusterTier cluster_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Options for in-transit encryption. enum InTransitEncryptionConfig { // Unspecified, will be inferred as default - diff --git a/google/devtools/cloudbuild/v1/cloudbuild.proto b/google/devtools/cloudbuild/v1/cloudbuild.proto index 20f7f3191fa48f..b4064bd1543df9 100644 --- a/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -528,6 +528,21 @@ message StorageSource { // Cloud Storage generation for the object. If the generation is // omitted, the latest generation will be used. int64 generation = 3; + + // Specifies the tool to fetch the source file for the build. + enum SourceFetcher { + // Unspecified. Defaults to GSUTIL. + SOURCE_FETCHER_UNSPECIFIED = 0; + + // Use the "gsutil" tool to download the source file. + GSUTIL = 1; + + // Use the Cloud Storage Fetcher tool to download the source file. + GCS_FETCHER = 2; + } + + // Option to specify the tool to fetch the source file for the build. + SourceFetcher source_fetcher = 5 [(google.api.field_behavior) = OPTIONAL]; } // Location of the source in any accessible Git repository. diff --git a/google/devtools/testing/v1/test_execution.proto b/google/devtools/testing/v1/test_execution.proto index 98c3998b4e8a79..e6c4876922aa4f 100644 --- a/google/devtools/testing/v1/test_execution.proto +++ b/google/devtools/testing/v1/test_execution.proto @@ -1262,7 +1262,7 @@ message UniformSharding { // Required. The total number of shards to create. This must always be a // positive number that is no greater than the total number of test cases. // When you select one or more physical devices, the number of shards must be - // <= 50. When you select one or more ARM virtual devices, it must be <= 100. + // <= 50. When you select one or more ARM virtual devices, it must be <= 200. // When you select only x86 virtual devices, it must be <= 500. int32 num_shards = 1; } @@ -1277,7 +1277,7 @@ message ManualSharding { // each manually-created shard. You must specify at least one shard if this // field is present. When you select one or more physical devices, the number // of repeated test_targets_for_shard must be <= 50. When you select one or - // more ARM virtual devices, it must be <= 100. When you select only x86 + // more ARM virtual devices, it must be <= 200. When you select only x86 // virtual devices, it must be <= 500. repeated TestTargetsForShard test_targets_for_shard = 1; } @@ -1329,7 +1329,7 @@ message SmartSharding { // // Note that there is a limit for maximum number of shards. When you select // one or more physical devices, the number of shards must be <= 50. When you - // select one or more ARM virtual devices, it must be <= 100. When you select + // select one or more ARM virtual devices, it must be <= 200. When you select // only x86 virtual devices, it must be <= 500. To guarantee at least one test // case for per shard, the number of shards will not exceed the number of test // cases. Each shard created counts toward daily test quota. diff --git a/google/spanner/v1/spanner.proto b/google/spanner/v1/spanner.proto index 68d31a47b585a1..367928a4515564 100644 --- a/google/spanner/v1/spanner.proto +++ b/google/spanner/v1/spanner.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ syntax = "proto3"; package google.spanner.v1; +import public "google/spanner/v1/commit_response.proto"; + import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; @@ -24,7 +26,6 @@ import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; -import public "google/spanner/v1/commit_response.proto"; import "google/spanner/v1/keys.proto"; import "google/spanner/v1/mutation.proto"; import "google/spanner/v1/result_set.proto"; @@ -84,7 +85,8 @@ service Spanner { // // This API can be used to initialize a session cache on the clients. // See https://goo.gl/TgSFN2 for best practices on session cache management. - rpc BatchCreateSessions(BatchCreateSessionsRequest) returns (BatchCreateSessionsResponse) { + rpc BatchCreateSessions(BatchCreateSessionsRequest) + returns (BatchCreateSessionsResponse) { option (google.api.http) = { post: "/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate" body: "*" @@ -127,10 +129,12 @@ service Spanner { // // Operations inside read-write transactions might return `ABORTED`. If // this occurs, the application should restart the transaction from - // the beginning. See [Transaction][google.spanner.v1.Transaction] for more details. + // the beginning. See [Transaction][google.spanner.v1.Transaction] for more + // details. // // Larger result sets can be fetched in streaming fashion by calling - // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead. + // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] + // instead. rpc ExecuteSql(ExecuteSqlRequest) returns (ResultSet) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql" @@ -138,11 +142,11 @@ service Spanner { }; } - // Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result - // set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there - // is no limit on the size of the returned result set. However, no - // individual row in the result set can exceed 100 MiB, and no - // column value can exceed 10 MiB. + // Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the + // result set as a stream. Unlike + // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there is no limit on + // the size of the returned result set. However, no individual row in the + // result set can exceed 100 MiB, and no column value can exceed 10 MiB. rpc ExecuteStreamingSql(ExecuteSqlRequest) returns (stream PartialResultSet) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql" @@ -155,13 +159,15 @@ service Spanner { // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. // // Statements are executed in sequential order. A request can succeed even if - // a statement fails. The [ExecuteBatchDmlResponse.status][google.spanner.v1.ExecuteBatchDmlResponse.status] field in the - // response provides information about the statement that failed. Clients must - // inspect this field to determine whether an error occurred. + // a statement fails. The + // [ExecuteBatchDmlResponse.status][google.spanner.v1.ExecuteBatchDmlResponse.status] + // field in the response provides information about the statement that failed. + // Clients must inspect this field to determine whether an error occurred. // // Execution stops after the first failed statement; the remaining statements // are not executed. - rpc ExecuteBatchDml(ExecuteBatchDmlRequest) returns (ExecuteBatchDmlResponse) { + rpc ExecuteBatchDml(ExecuteBatchDmlRequest) + returns (ExecuteBatchDmlResponse) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml" body: "*" @@ -170,14 +176,15 @@ service Spanner { // Reads rows from the database using key lookups and scans, as a // simple key/value style alternative to - // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to - // return a result set larger than 10 MiB; if the read matches more + // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be + // used to return a result set larger than 10 MiB; if the read matches more // data than that, the read fails with a `FAILED_PRECONDITION` // error. // // Reads inside read-write transactions might return `ABORTED`. If // this occurs, the application should restart the transaction from - // the beginning. See [Transaction][google.spanner.v1.Transaction] for more details. + // the beginning. See [Transaction][google.spanner.v1.Transaction] for more + // details. // // Larger result sets can be yielded in streaming fashion by calling // [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead. @@ -188,9 +195,9 @@ service Spanner { }; } - // Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a - // stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the - // size of the returned result set. However, no individual row in + // Like [Read][google.spanner.v1.Spanner.Read], except returns the result set + // as a stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no + // limit on the size of the returned result set. However, no individual row in // the result set can exceed 100 MiB, and no column value can exceed // 10 MiB. rpc StreamingRead(ReadRequest) returns (stream PartialResultSet) { @@ -201,7 +208,8 @@ service Spanner { } // Begins a new transaction. This step can often be skipped: - // [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and + // [Read][google.spanner.v1.Spanner.Read], + // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and // [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a // side-effect. rpc BeginTransaction(BeginTransactionRequest) returns (Transaction) { @@ -232,13 +240,15 @@ service Spanner { body: "*" }; option (google.api.method_signature) = "session,transaction_id,mutations"; - option (google.api.method_signature) = "session,single_use_transaction,mutations"; + option (google.api.method_signature) = + "session,single_use_transaction,mutations"; } // Rolls back a transaction, releasing any locks it holds. It is a good // idea to call this for any transaction that includes one or more - // [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and - // ultimately decides not to commit. + // [Read][google.spanner.v1.Spanner.Read] or + // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and ultimately + // decides not to commit. // // `Rollback` returns `OK` if it successfully aborts the transaction, the // transaction was already aborted, or the transaction is not @@ -253,10 +263,11 @@ service Spanner { // Creates a set of partition tokens that can be used to execute a query // operation in parallel. Each of the returned partition tokens can be used - // by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to specify a subset - // of the query result to read. The same session and read-only transaction - // must be used by the PartitionQueryRequest used to create the - // partition tokens and the ExecuteSqlRequests that use the partition tokens. + // by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to + // specify a subset of the query result to read. The same session and + // read-only transaction must be used by the PartitionQueryRequest used to + // create the partition tokens and the ExecuteSqlRequests that use the + // partition tokens. // // Partition tokens become invalid when the session used to create them // is deleted, is idle for too long, begins a new transaction, or becomes too @@ -271,12 +282,13 @@ service Spanner { // Creates a set of partition tokens that can be used to execute a read // operation in parallel. Each of the returned partition tokens can be used - // by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a subset of the read - // result to read. The same session and read-only transaction must be used by - // the PartitionReadRequest used to create the partition tokens and the - // ReadRequests that use the partition tokens. There are no ordering - // guarantees on rows returned among the returned partition tokens, or even - // within each individual StreamingRead call issued with a partition_token. + // by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a + // subset of the read result to read. The same session and read-only + // transaction must be used by the PartitionReadRequest used to create the + // partition tokens and the ReadRequests that use the partition tokens. There + // are no ordering guarantees on rows returned among the returned partition + // tokens, or even within each individual StreamingRead call issued with a + // partition_token. // // Partition tokens become invalid when the session used to create them // is deleted, is idle for too long, begins a new transaction, or becomes too @@ -327,7 +339,8 @@ message CreateSessionRequest { Session session = 2 [(google.api.field_behavior) = REQUIRED]; } -// The request for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. +// The request for +// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. message BatchCreateSessionsRequest { // Required. The database in which the new sessions are created. string database = 1 [ @@ -344,11 +357,13 @@ message BatchCreateSessionsRequest { // The API may return fewer than the requested number of sessions. If a // specific number of sessions are desired, the client can make additional // calls to BatchCreateSessions (adjusting - // [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count] as necessary). + // [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count] + // as necessary). int32 session_count = 3 [(google.api.field_behavior) = REQUIRED]; } -// The response for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. +// The response for +// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. message BatchCreateSessionsResponse { // The freshly created sessions. repeated Session session = 1; @@ -376,11 +391,13 @@ message Session { map labels = 2; // Output only. The timestamp when the session is created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The approximate timestamp when the session is last used. It is // typically earlier than the actual last use time. - google.protobuf.Timestamp approximate_last_use_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp approximate_last_use_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The database role which created this session. string creator_role = 5; @@ -391,9 +408,7 @@ message GetSessionRequest { // Required. The name of the session to retrieve. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; } @@ -412,7 +427,8 @@ message ListSessionsRequest { int32 page_size = 2; // If non-empty, `page_token` should contain a - // [next_page_token][google.spanner.v1.ListSessionsResponse.next_page_token] from a previous + // [next_page_token][google.spanner.v1.ListSessionsResponse.next_page_token] + // from a previous // [ListSessionsResponse][google.spanner.v1.ListSessionsResponse]. string page_token = 3; @@ -435,8 +451,8 @@ message ListSessionsResponse { repeated Session sessions = 1; // `next_page_token` can be sent in a subsequent - // [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more of the matching - // sessions. + // [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more + // of the matching sessions. string next_page_token = 2; } @@ -445,9 +461,7 @@ message DeleteSessionRequest { // Required. The name of the session to delete. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; } @@ -512,6 +526,86 @@ message RequestOptions { string transaction_tag = 3; } +// The DirectedReadOptions can be used to indicate which replicas or regions +// should be used for non-transactional reads or queries. +// +// DirectedReadOptions may only be specified for a read-only transaction, +// otherwise the API will return an `INVALID_ARGUMENT` error. +message DirectedReadOptions { + // The directed read replica selector. + // Callers must provide one or more of the following fields for replica + // selection: + // + // * `location` - The location must be one of the regions within the + // multi-region configuration of your database. + // * `type` - The type of the replica. + // + // Some examples of using replica_selectors are: + // + // * `location:us-east1` --> The "us-east1" replica(s) of any available type + // will be used to process the request. + // * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in nearest + // . available location will be used to process the + // request. + // * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) + // in location "us-east1" will be used to process + // the request. + message ReplicaSelection { + // Indicates the type of replica. + enum Type { + // Not specified. + TYPE_UNSPECIFIED = 0; + + // Read-write replicas support both reads and writes. + READ_WRITE = 1; + + // Read-only replicas only support reads (not writes). + READ_ONLY = 2; + } + + // The location or region of the serving requests, e.g. "us-east1". + string location = 1; + + // The type of replica. + Type type = 2; + } + + // An IncludeReplicas contains a repeated set of ReplicaSelection which + // indicates the order in which replicas should be considered. + message IncludeReplicas { + // The directed read replica selector. + repeated ReplicaSelection replica_selections = 1; + + // If true, Spanner will not route requests to a replica outside the + // include_replicas list when all of the specified replicas are unavailable + // or unhealthy. Default value is `false`. + bool auto_failover_disabled = 2; + } + + // An ExcludeReplicas contains a repeated set of ReplicaSelection that should + // be excluded from serving requests. + message ExcludeReplicas { + // The directed read replica selector. + repeated ReplicaSelection replica_selections = 1; + } + + // Required. Replicas indicates the order in which replicas should be + // considered. At most one of either include_replicas or exclude_replicas + // should be present in the message. + oneof replicas { + // Include_replicas indicates the order of replicas (as they appear in + // this list) to process the request. If auto_failover_disabled is set to + // true and all replicas are exhausted without finding a healthy replica, + // Spanner will wait for a replica in the list to become available, requests + // may fail due to `DEADLINE_EXCEEDED` errors. + IncludeReplicas include_replicas = 1; + + // Exclude_replicas indicates that should be excluded from serving + // requests. Spanner will not route requests to the replicas in this list. + ExcludeReplicas exclude_replicas = 2; + } +} + // The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]. message ExecuteSqlRequest { @@ -585,9 +679,7 @@ message ExecuteSqlRequest { // Required. The session in which the SQL query should be performed. string session = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; // The transaction to use. @@ -622,7 +714,8 @@ message ExecuteSqlRequest { // It is not always possible for Cloud Spanner to infer the right SQL type // from a JSON value. For example, values of type `BYTES` and values - // of type `STRING` both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. + // of type `STRING` both appear in + // [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. // // In these cases, `param_types` can be used to specify the exact // SQL type for some or all of the SQL statement parameters. See the @@ -632,15 +725,18 @@ message ExecuteSqlRequest { // If this request is resuming a previously interrupted SQL statement // execution, `resume_token` should be copied from the last - // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this - // enables the new SQL statement execution to resume where the last one left - // off. The rest of the request parameters must exactly match the - // request that yielded this token. + // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the + // interruption. Doing this enables the new SQL statement execution to resume + // where the last one left off. The rest of the request parameters must + // exactly match the request that yielded this token. bytes resume_token = 6; // Used to control the amount of debugging information returned in - // [ResultSetStats][google.spanner.v1.ResultSetStats]. If [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only - // be set to [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL]. + // [ResultSetStats][google.spanner.v1.ResultSetStats]. If + // [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is + // set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only + // be set to + // [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL]. QueryMode query_mode = 7; // If present, results will be restricted to the specified partition @@ -667,11 +763,14 @@ message ExecuteSqlRequest { // Common options for this request. RequestOptions request_options = 11; + // Directed read options for this request. + DirectedReadOptions directed_read_options = 15; + // If this is for a partitioned query and this field is set to `true`, the - // request will be executed via Spanner independent compute resources. + // request is executed with Spanner Data Boost independent compute resources. // // If the field is set to `true` but the request does not set - // `partition_token`, the API will return an `INVALID_ARGUMENT` error. + // `partition_token`, the API returns an `INVALID_ARGUMENT` error. bool data_boost_enabled = 16; } @@ -698,7 +797,9 @@ message ExecuteBatchDmlRequest { // It is not always possible for Cloud Spanner to infer the right SQL type // from a JSON value. For example, values of type `BYTES` and values - // of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings. + // of type `STRING` both appear in + // [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as + // JSON strings. // // In these cases, `param_types` can be used to specify the exact // SQL type for some or all of the SQL statement parameters. See the @@ -710,9 +811,7 @@ message ExecuteBatchDmlRequest { // Required. The session in which the DML statements should be performed. string session = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; // Required. The transaction to use. Must be a read-write transaction. @@ -722,17 +821,17 @@ message ExecuteBatchDmlRequest { // transaction. TransactionSelector transaction = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The list of statements to execute in this batch. Statements are executed - // serially, such that the effects of statement `i` are visible to statement - // `i+1`. Each statement must be a DML statement. Execution stops at the - // first failed statement; the remaining statements are not executed. + // Required. The list of statements to execute in this batch. Statements are + // executed serially, such that the effects of statement `i` are visible to + // statement `i+1`. Each statement must be a DML statement. Execution stops at + // the first failed statement; the remaining statements are not executed. // // Callers must provide at least one statement. repeated Statement statements = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. A per-transaction sequence number used to identify this request. This field - // makes each request idempotent such that if the request is received multiple - // times, at most one will succeed. + // Required. A per-transaction sequence number used to identify this request. + // This field makes each request idempotent such that if the request is + // received multiple times, at most one will succeed. // // The sequence number must be monotonically increasing within the // transaction. If a request arrives for the first time with an out-of-order @@ -744,38 +843,47 @@ message ExecuteBatchDmlRequest { RequestOptions request_options = 5; } -// The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list -// of [ResultSet][google.spanner.v1.ResultSet] messages, one for each DML statement that has successfully -// executed, in the same order as the statements in the request. If a statement -// fails, the status in the response body identifies the cause of the failure. +// The response for +// [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list +// of [ResultSet][google.spanner.v1.ResultSet] messages, one for each DML +// statement that has successfully executed, in the same order as the statements +// in the request. If a statement fails, the status in the response body +// identifies the cause of the failure. // // To check for DML statements that failed, use the following approach: // -// 1. Check the status in the response message. The [google.rpc.Code][google.rpc.Code] enum +// 1. Check the status in the response message. The +// [google.rpc.Code][google.rpc.Code] enum // value `OK` indicates that all statements were executed successfully. // 2. If the status was not `OK`, check the number of result sets in the -// response. If the response contains `N` [ResultSet][google.spanner.v1.ResultSet] messages, then -// statement `N+1` in the request failed. +// response. If the response contains `N` +// [ResultSet][google.spanner.v1.ResultSet] messages, then statement `N+1` in +// the request failed. // // Example 1: // // * Request: 5 DML statements, all executed successfully. -// * Response: 5 [ResultSet][google.spanner.v1.ResultSet] messages, with the status `OK`. +// * Response: 5 [ResultSet][google.spanner.v1.ResultSet] messages, with the +// status `OK`. // // Example 2: // // * Request: 5 DML statements. The third statement has a syntax error. -// * Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax error (`INVALID_ARGUMENT`) -// status. The number of [ResultSet][google.spanner.v1.ResultSet] messages indicates that the third -// statement failed, and the fourth and fifth statements were not executed. +// * Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax +// error (`INVALID_ARGUMENT`) +// status. The number of [ResultSet][google.spanner.v1.ResultSet] messages +// indicates that the third statement failed, and the fourth and fifth +// statements were not executed. message ExecuteBatchDmlResponse { - // One [ResultSet][google.spanner.v1.ResultSet] for each statement in the request that ran successfully, - // in the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] does - // not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] contain - // the number of rows modified by the statement. + // One [ResultSet][google.spanner.v1.ResultSet] for each statement in the + // request that ran successfully, in the same order as the statements in the + // request. Each [ResultSet][google.spanner.v1.ResultSet] does not contain any + // rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each + // [ResultSet][google.spanner.v1.ResultSet] contain the number of rows + // modified by the statement. // - // Only the first [ResultSet][google.spanner.v1.ResultSet] in the response contains valid - // [ResultSetMetadata][google.spanner.v1.ResultSetMetadata]. + // Only the first [ResultSet][google.spanner.v1.ResultSet] in the response + // contains valid [ResultSetMetadata][google.spanner.v1.ResultSetMetadata]. repeated ResultSet result_sets = 1; // If all DML statements are executed successfully, the status is `OK`. @@ -810,24 +918,23 @@ message PartitionQueryRequest { // Required. The session used to create the partitions. string session = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; // Read only snapshot transactions are supported, read/write and single use // transactions are not. TransactionSelector transaction = 2; - // Required. The query request to generate partitions for. The request will fail if - // the query is not root partitionable. The query plan of a root - // partitionable query has a single distributed union operator. A distributed - // union operator conceptually divides one or more tables into multiple - // splits, remotely evaluates a subquery independently on each split, and - // then unions all results. + // Required. The query request to generate partitions for. The request will + // fail if the query is not root partitionable. For a query to be root + // partitionable, it needs to satisfy a few conditions. For example, the first + // operator in the query execution plan must be a distributed union operator. + // For more information about other conditions, see [Read data in + // parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). // - // This must not contain DML commands, such as INSERT, UPDATE, or - // DELETE. Use [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a + // The query request must not contain DML commands, such as INSERT, UPDATE, or + // DELETE. Use + // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a // PartitionedDml transaction for large, partition-friendly DML operations. string sql = 3 [(google.api.field_behavior) = REQUIRED]; @@ -847,7 +954,8 @@ message PartitionQueryRequest { // It is not always possible for Cloud Spanner to infer the right SQL type // from a JSON value. For example, values of type `BYTES` and values - // of type `STRING` both appear in [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings. + // of type `STRING` both appear in + // [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings. // // In these cases, `param_types` can be used to specify the exact // SQL type for some or all of the SQL query parameters. See the @@ -864,9 +972,7 @@ message PartitionReadRequest { // Required. The session used to create the partitions. string session = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; // Read only snapshot transactions are supported, read/write and single use @@ -876,18 +982,24 @@ message PartitionReadRequest { // Required. The name of the table in the database to be read. string table = 3 [(google.api.field_behavior) = REQUIRED]; - // If non-empty, the name of an index on [table][google.spanner.v1.PartitionReadRequest.table]. This index is - // used instead of the table primary key when interpreting [key_set][google.spanner.v1.PartitionReadRequest.key_set] - // and sorting result rows. See [key_set][google.spanner.v1.PartitionReadRequest.key_set] for further information. + // If non-empty, the name of an index on + // [table][google.spanner.v1.PartitionReadRequest.table]. This index is used + // instead of the table primary key when interpreting + // [key_set][google.spanner.v1.PartitionReadRequest.key_set] and sorting + // result rows. See [key_set][google.spanner.v1.PartitionReadRequest.key_set] + // for further information. string index = 4; - // The columns of [table][google.spanner.v1.PartitionReadRequest.table] to be returned for each row matching - // this request. + // The columns of [table][google.spanner.v1.PartitionReadRequest.table] to be + // returned for each row matching this request. repeated string columns = 5; // Required. `key_set` identifies the rows to be yielded. `key_set` names the - // primary keys of the rows in [table][google.spanner.v1.PartitionReadRequest.table] to be yielded, unless [index][google.spanner.v1.PartitionReadRequest.index] - // is present. If [index][google.spanner.v1.PartitionReadRequest.index] is present, then [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names + // primary keys of the rows in + // [table][google.spanner.v1.PartitionReadRequest.table] to be yielded, unless + // [index][google.spanner.v1.PartitionReadRequest.index] is present. If + // [index][google.spanner.v1.PartitionReadRequest.index] is present, then + // [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names // index keys in [index][google.spanner.v1.PartitionReadRequest.index]. // // It is not an error for the `key_set` to name rows that do not @@ -923,9 +1035,7 @@ message ReadRequest { // Required. The session in which the read should be performed. string session = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; // The transaction to use. If none is provided, the default is a @@ -935,24 +1045,31 @@ message ReadRequest { // Required. The name of the table in the database to be read. string table = 3 [(google.api.field_behavior) = REQUIRED]; - // If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table]. This index is - // used instead of the table primary key when interpreting [key_set][google.spanner.v1.ReadRequest.key_set] - // and sorting result rows. See [key_set][google.spanner.v1.ReadRequest.key_set] for further information. + // If non-empty, the name of an index on + // [table][google.spanner.v1.ReadRequest.table]. This index is used instead of + // the table primary key when interpreting + // [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows. + // See [key_set][google.spanner.v1.ReadRequest.key_set] for further + // information. string index = 4; - // Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching - // this request. + // Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be + // returned for each row matching this request. repeated string columns = 5 [(google.api.field_behavior) = REQUIRED]; // Required. `key_set` identifies the rows to be yielded. `key_set` names the - // primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to be yielded, unless [index][google.spanner.v1.ReadRequest.index] - // is present. If [index][google.spanner.v1.ReadRequest.index] is present, then [key_set][google.spanner.v1.ReadRequest.key_set] instead names - // index keys in [index][google.spanner.v1.ReadRequest.index]. + // primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to + // be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present. + // If [index][google.spanner.v1.ReadRequest.index] is present, then + // [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys + // in [index][google.spanner.v1.ReadRequest.index]. // - // If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is empty, rows are yielded - // in table primary key order (if [index][google.spanner.v1.ReadRequest.index] is empty) or index key order - // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is not - // empty, rows will be yielded in an unspecified order. + // If the [partition_token][google.spanner.v1.ReadRequest.partition_token] + // field is empty, rows are yielded in table primary key order (if + // [index][google.spanner.v1.ReadRequest.index] is empty) or index key order + // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the + // [partition_token][google.spanner.v1.ReadRequest.partition_token] field is + // not empty, rows will be yielded in an unspecified order. // // It is not an error for the `key_set` to name rows that do not // exist in the database. Read yields nothing for nonexistent rows. @@ -965,9 +1082,9 @@ message ReadRequest { // If this request is resuming a previously interrupted read, // `resume_token` should be copied from the last - // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this - // enables the new read to resume where the last read left off. The - // rest of the request parameters must exactly match the request + // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the + // interruption. Doing this enables the new read to resume where the last read + // left off. The rest of the request parameters must exactly match the request // that yielded this token. bytes resume_token = 9; @@ -980,22 +1097,24 @@ message ReadRequest { // Common options for this request. RequestOptions request_options = 11; + // Directed read options for this request. + DirectedReadOptions directed_read_options = 14; + // If this is for a partitioned read and this field is set to `true`, the - // request will be executed via Spanner independent compute resources. + // request is executed with Spanner Data Boost independent compute resources. // // If the field is set to `true` but the request does not set - // `partition_token`, the API will return an `INVALID_ARGUMENT` error. + // `partition_token`, the API returns an `INVALID_ARGUMENT` error. bool data_boost_enabled = 15; } -// The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. +// The request for +// [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. message BeginTransactionRequest { // Required. The session in which the transaction runs. string session = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; // Required. Options for the new transaction. @@ -1014,9 +1133,7 @@ message CommitRequest { // Required. The session in which the transaction to be committed is running. string session = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; // Required. The transaction in which to commit. @@ -1042,8 +1159,8 @@ message CommitRequest { repeated Mutation mutations = 4; // If `true`, then statistics related to the transaction will be included in - // the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is - // `false`. + // the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. + // Default value is `false`. bool return_commit_stats = 5; // Common options for this request. @@ -1055,9 +1172,7 @@ message RollbackRequest { // Required. The session in which the transaction to roll back is running. string session = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "spanner.googleapis.com/Session" - } + (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; // Required. The transaction to roll back.