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