deployment.proto 6.5 KB

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