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