1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.dialogflow.cx.v3; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/protobuf/timestamp.proto"; 24 25option cc_enable_arenas = true; 26option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; 27option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; 28option java_multiple_files = true; 29option java_outer_classname = "DeploymentProto"; 30option java_package = "com.google.cloud.dialogflow.cx.v3"; 31option objc_class_prefix = "DF"; 32option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; 33 34// Service for managing [Deployments][google.cloud.dialogflow.cx.v3.Deployment]. 35service Deployments { 36 option (google.api.default_host) = "dialogflow.googleapis.com"; 37 option (google.api.oauth_scopes) = 38 "https://www.googleapis.com/auth/cloud-platform," 39 "https://www.googleapis.com/auth/dialogflow"; 40 41 // Returns the list of all deployments in the specified 42 // [Environment][google.cloud.dialogflow.cx.v3.Environment]. 43 rpc ListDeployments(ListDeploymentsRequest) 44 returns (ListDeploymentsResponse) { 45 option (google.api.http) = { 46 get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/deployments" 47 }; 48 option (google.api.method_signature) = "parent"; 49 } 50 51 // Retrieves the specified 52 // [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. 53 rpc GetDeployment(GetDeploymentRequest) returns (Deployment) { 54 option (google.api.http) = { 55 get: "/v3/{name=projects/*/locations/*/agents/*/environments/*/deployments/*}" 56 }; 57 option (google.api.method_signature) = "name"; 58 } 59} 60 61// Represents a deployment in an environment. A deployment happens when a flow 62// version configured to be active in the environment. You can configure running 63// pre-deployment steps, e.g. running validation test cases, experiment 64// auto-rollout, etc. 65message Deployment { 66 option (google.api.resource) = { 67 type: "dialogflow.googleapis.com/Deployment" 68 pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}" 69 }; 70 71 // The state of the deployment. 72 enum State { 73 // State unspecified. 74 STATE_UNSPECIFIED = 0; 75 76 // The deployment is running. 77 RUNNING = 1; 78 79 // The deployment succeeded. 80 SUCCEEDED = 2; 81 82 // The deployment failed. 83 FAILED = 3; 84 } 85 86 // Result of the deployment. 87 message Result { 88 // Results of test cases running before the deployment. 89 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 90 // ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`. 91 repeated string deployment_test_results = 1 92 [(google.api.resource_reference) = { 93 type: "dialogflow.googleapis.com/TestCaseResult" 94 }]; 95 96 // The name of the experiment triggered by this deployment. 97 // Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent 98 // ID>/environments/<Environment ID>/experiments/<Experiment ID>. 99 string experiment = 2 [(google.api.resource_reference) = { 100 type: "dialogflow.googleapis.com/Experiment" 101 }]; 102 } 103 104 // The name of the deployment. 105 // Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent 106 // ID>/environments/<Environment ID>/deployments/<Deployment ID>. 107 string name = 1; 108 109 // The name of the flow version for this deployment. 110 // Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent 111 // ID>/flows/<Flow ID>/versions/<Verion ID>. 112 string flow_version = 2 [(google.api.resource_reference) = { 113 type: "dialogflow.googleapis.com/Version" 114 }]; 115 116 // The current state of the deployment. 117 State state = 3; 118 119 // Result of the deployment. 120 Result result = 4; 121 122 // Start time of this deployment. 123 google.protobuf.Timestamp start_time = 5; 124 125 // End time of this deployment. 126 google.protobuf.Timestamp end_time = 6; 127} 128 129// The request message for 130// [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3.Deployments.ListDeployments]. 131message ListDeploymentsRequest { 132 // Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to 133 // list all environments for. Format: `projects/<Project 134 // ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment 135 // ID>`. 136 string parent = 1 [ 137 (google.api.field_behavior) = REQUIRED, 138 (google.api.resource_reference) = { 139 child_type: "dialogflow.googleapis.com/Deployment" 140 } 141 ]; 142 143 // The maximum number of items to return in a single page. By default 20 and 144 // at most 100. 145 int32 page_size = 2; 146 147 // The next_page_token value returned from a previous list request. 148 string page_token = 3; 149} 150 151// The response message for 152// [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3.Deployments.ListDeployments]. 153message ListDeploymentsResponse { 154 // The list of deployments. There will be a maximum number of items 155 // returned based on the page_size field in the request. The list may in some 156 // cases be empty or contain fewer entries than page_size even if this isn't 157 // the last page. 158 repeated Deployment deployments = 1; 159 160 // Token to retrieve the next page of results, or empty if there are no more 161 // results in the list. 162 string next_page_token = 2; 163} 164 165// The request message for 166// [Deployments.GetDeployment][google.cloud.dialogflow.cx.v3.Deployments.GetDeployment]. 167message GetDeploymentRequest { 168 // Required. The name of the 169 // [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: 170 // `projects/<Project ID>/locations/<Location ID>/agents/<Agent 171 // ID>/environments/<Environment ID>/deployments/<Deployment ID>`. 172 string name = 1 [ 173 (google.api.field_behavior) = REQUIRED, 174 (google.api.resource_reference) = { 175 type: "dialogflow.googleapis.com/Deployment" 176 } 177 ]; 178} 179