xref: /aosp_15_r20/external/googleapis/google/cloud/dialogflow/v2beta1/environment.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.dialogflow.v2beta1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/api/annotations.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/api/client.proto";
21*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto";
22*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto";
23*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/dialogflow/v2beta1/audio_config.proto";
24*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/dialogflow/v2beta1/fulfillment.proto";
25*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/empty.proto";
26*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/field_mask.proto";
27*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto";
28*d5c09012SAndroid Build Coastguard Worker
29*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true;
30*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1";
31*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb";
32*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
33*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "EnvironmentProto";
34*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.dialogflow.v2beta1";
35*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "DF";
36*d5c09012SAndroid Build Coastguard Worker
37*d5c09012SAndroid Build Coastguard Worker// Service for managing
38*d5c09012SAndroid Build Coastguard Worker// [Environments][google.cloud.dialogflow.v2beta1.Environment].
39*d5c09012SAndroid Build Coastguard Workerservice Environments {
40*d5c09012SAndroid Build Coastguard Worker  option (google.api.default_host) = "dialogflow.googleapis.com";
41*d5c09012SAndroid Build Coastguard Worker  option (google.api.oauth_scopes) =
42*d5c09012SAndroid Build Coastguard Worker      "https://www.googleapis.com/auth/cloud-platform,"
43*d5c09012SAndroid Build Coastguard Worker      "https://www.googleapis.com/auth/dialogflow";
44*d5c09012SAndroid Build Coastguard Worker
45*d5c09012SAndroid Build Coastguard Worker  // Returns the list of all non-draft environments of the specified agent.
46*d5c09012SAndroid Build Coastguard Worker  rpc ListEnvironments(ListEnvironmentsRequest)
47*d5c09012SAndroid Build Coastguard Worker      returns (ListEnvironmentsResponse) {
48*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
49*d5c09012SAndroid Build Coastguard Worker      get: "/v2beta1/{parent=projects/*/agent}/environments"
50*d5c09012SAndroid Build Coastguard Worker      additional_bindings {
51*d5c09012SAndroid Build Coastguard Worker        get: "/v2beta1/{parent=projects/*/locations/*/agent}/environments"
52*d5c09012SAndroid Build Coastguard Worker      }
53*d5c09012SAndroid Build Coastguard Worker    };
54*d5c09012SAndroid Build Coastguard Worker    option (google.api.method_signature) = "parent";
55*d5c09012SAndroid Build Coastguard Worker  }
56*d5c09012SAndroid Build Coastguard Worker
57*d5c09012SAndroid Build Coastguard Worker  // Retrieves the specified agent environment.
58*d5c09012SAndroid Build Coastguard Worker  rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) {
59*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
60*d5c09012SAndroid Build Coastguard Worker      get: "/v2beta1/{name=projects/*/agent/environments/*}"
61*d5c09012SAndroid Build Coastguard Worker      additional_bindings {
62*d5c09012SAndroid Build Coastguard Worker        get: "/v2beta1/{name=projects/*/locations/*/agent/environments/*}"
63*d5c09012SAndroid Build Coastguard Worker      }
64*d5c09012SAndroid Build Coastguard Worker    };
65*d5c09012SAndroid Build Coastguard Worker  }
66*d5c09012SAndroid Build Coastguard Worker
67*d5c09012SAndroid Build Coastguard Worker  // Creates an agent environment.
68*d5c09012SAndroid Build Coastguard Worker  rpc CreateEnvironment(CreateEnvironmentRequest) returns (Environment) {
69*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
70*d5c09012SAndroid Build Coastguard Worker      post: "/v2beta1/{parent=projects/*/agent}/environments"
71*d5c09012SAndroid Build Coastguard Worker      body: "environment"
72*d5c09012SAndroid Build Coastguard Worker      additional_bindings {
73*d5c09012SAndroid Build Coastguard Worker        post: "/v2beta1/{parent=projects/*/locations/*/agent}/environments"
74*d5c09012SAndroid Build Coastguard Worker        body: "environment"
75*d5c09012SAndroid Build Coastguard Worker      }
76*d5c09012SAndroid Build Coastguard Worker    };
77*d5c09012SAndroid Build Coastguard Worker  }
78*d5c09012SAndroid Build Coastguard Worker
79*d5c09012SAndroid Build Coastguard Worker  // Updates the specified agent environment.
80*d5c09012SAndroid Build Coastguard Worker  //
81*d5c09012SAndroid Build Coastguard Worker  // This method allows you to deploy new agent versions into the environment.
82*d5c09012SAndroid Build Coastguard Worker  // When an environment is pointed to a new agent version by setting
83*d5c09012SAndroid Build Coastguard Worker  // `environment.agent_version`, the environment is temporarily set to the
84*d5c09012SAndroid Build Coastguard Worker  // `LOADING` state. During that time, the environment keeps on serving the
85*d5c09012SAndroid Build Coastguard Worker  // previous version of the agent. After the new agent version is done loading,
86*d5c09012SAndroid Build Coastguard Worker  // the environment is set back to the `RUNNING` state.
87*d5c09012SAndroid Build Coastguard Worker  // You can use "-" as Environment ID in environment name to update version
88*d5c09012SAndroid Build Coastguard Worker  // in "draft" environment. WARNING: this will negate all recent changes to
89*d5c09012SAndroid Build Coastguard Worker  // draft and can't be undone. You may want to save the draft to a version
90*d5c09012SAndroid Build Coastguard Worker  // before calling this function.
91*d5c09012SAndroid Build Coastguard Worker  rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (Environment) {
92*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
93*d5c09012SAndroid Build Coastguard Worker      patch: "/v2beta1/{environment.name=projects/*/agent/environments/*}"
94*d5c09012SAndroid Build Coastguard Worker      body: "environment"
95*d5c09012SAndroid Build Coastguard Worker      additional_bindings {
96*d5c09012SAndroid Build Coastguard Worker        patch: "/v2beta1/{environment.name=projects/*/locations/*/agent/environments/*}"
97*d5c09012SAndroid Build Coastguard Worker        body: "environment"
98*d5c09012SAndroid Build Coastguard Worker      }
99*d5c09012SAndroid Build Coastguard Worker    };
100*d5c09012SAndroid Build Coastguard Worker  }
101*d5c09012SAndroid Build Coastguard Worker
102*d5c09012SAndroid Build Coastguard Worker  // Deletes the specified agent environment.
103*d5c09012SAndroid Build Coastguard Worker  rpc DeleteEnvironment(DeleteEnvironmentRequest)
104*d5c09012SAndroid Build Coastguard Worker      returns (google.protobuf.Empty) {
105*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
106*d5c09012SAndroid Build Coastguard Worker      delete: "/v2beta1/{name=projects/*/agent/environments/*}"
107*d5c09012SAndroid Build Coastguard Worker      additional_bindings {
108*d5c09012SAndroid Build Coastguard Worker        delete: "/v2beta1/{name=projects/*/locations/*/agent/environments/*}"
109*d5c09012SAndroid Build Coastguard Worker      }
110*d5c09012SAndroid Build Coastguard Worker    };
111*d5c09012SAndroid Build Coastguard Worker  }
112*d5c09012SAndroid Build Coastguard Worker
113*d5c09012SAndroid Build Coastguard Worker  // Gets the history of the specified environment.
114*d5c09012SAndroid Build Coastguard Worker  rpc GetEnvironmentHistory(GetEnvironmentHistoryRequest)
115*d5c09012SAndroid Build Coastguard Worker      returns (EnvironmentHistory) {
116*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
117*d5c09012SAndroid Build Coastguard Worker      get: "/v2beta1/{parent=projects/*/agent/environments/*}/history"
118*d5c09012SAndroid Build Coastguard Worker      additional_bindings {
119*d5c09012SAndroid Build Coastguard Worker        get: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*}/history"
120*d5c09012SAndroid Build Coastguard Worker      }
121*d5c09012SAndroid Build Coastguard Worker    };
122*d5c09012SAndroid Build Coastguard Worker  }
123*d5c09012SAndroid Build Coastguard Worker}
124*d5c09012SAndroid Build Coastguard Worker
125*d5c09012SAndroid Build Coastguard Worker// You can create multiple versions of your agent and publish them to separate
126*d5c09012SAndroid Build Coastguard Worker// environments.
127*d5c09012SAndroid Build Coastguard Worker//
128*d5c09012SAndroid Build Coastguard Worker// When you edit an agent, you are editing the draft agent. At any point, you
129*d5c09012SAndroid Build Coastguard Worker// can save the draft agent as an agent version, which is an immutable snapshot
130*d5c09012SAndroid Build Coastguard Worker// of your agent.
131*d5c09012SAndroid Build Coastguard Worker//
132*d5c09012SAndroid Build Coastguard Worker// When you save the draft agent, it is published to the default environment.
133*d5c09012SAndroid Build Coastguard Worker// When you create agent versions, you can publish them to custom environments.
134*d5c09012SAndroid Build Coastguard Worker// You can create a variety of custom environments for:
135*d5c09012SAndroid Build Coastguard Worker//
136*d5c09012SAndroid Build Coastguard Worker// - testing
137*d5c09012SAndroid Build Coastguard Worker// - development
138*d5c09012SAndroid Build Coastguard Worker// - production
139*d5c09012SAndroid Build Coastguard Worker// - etc.
140*d5c09012SAndroid Build Coastguard Worker//
141*d5c09012SAndroid Build Coastguard Worker// For more information, see the [versions and environments
142*d5c09012SAndroid Build Coastguard Worker// guide](https://cloud.google.com/dialogflow/docs/agents-versions).
143*d5c09012SAndroid Build Coastguard Workermessage Environment {
144*d5c09012SAndroid Build Coastguard Worker  option (google.api.resource) = {
145*d5c09012SAndroid Build Coastguard Worker    type: "dialogflow.googleapis.com/Environment"
146*d5c09012SAndroid Build Coastguard Worker    pattern: "projects/{project}/agent/environments/{environment}"
147*d5c09012SAndroid Build Coastguard Worker    pattern: "projects/{project}/locations/{location}/agent/environments/{environment}"
148*d5c09012SAndroid Build Coastguard Worker  };
149*d5c09012SAndroid Build Coastguard Worker
150*d5c09012SAndroid Build Coastguard Worker  // Represents an environment state. When an environment is pointed to a new
151*d5c09012SAndroid Build Coastguard Worker  // agent version, the environment is temporarily set to the `LOADING` state.
152*d5c09012SAndroid Build Coastguard Worker  // During that time, the environment keeps on serving the previous version of
153*d5c09012SAndroid Build Coastguard Worker  // the agent. After the new agent version is done loading, the environment is
154*d5c09012SAndroid Build Coastguard Worker  // set back to the `RUNNING` state.
155*d5c09012SAndroid Build Coastguard Worker  enum State {
156*d5c09012SAndroid Build Coastguard Worker    // Not specified. This value is not used.
157*d5c09012SAndroid Build Coastguard Worker    STATE_UNSPECIFIED = 0;
158*d5c09012SAndroid Build Coastguard Worker
159*d5c09012SAndroid Build Coastguard Worker    // Stopped.
160*d5c09012SAndroid Build Coastguard Worker    STOPPED = 1;
161*d5c09012SAndroid Build Coastguard Worker
162*d5c09012SAndroid Build Coastguard Worker    // Loading.
163*d5c09012SAndroid Build Coastguard Worker    LOADING = 2;
164*d5c09012SAndroid Build Coastguard Worker
165*d5c09012SAndroid Build Coastguard Worker    // Running.
166*d5c09012SAndroid Build Coastguard Worker    RUNNING = 3;
167*d5c09012SAndroid Build Coastguard Worker  }
168*d5c09012SAndroid Build Coastguard Worker
169*d5c09012SAndroid Build Coastguard Worker  // Output only. The unique identifier of this agent environment.
170*d5c09012SAndroid Build Coastguard Worker  // Supported formats:
171*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/agent/environments/<Environment ID>`
172*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/locations/<Location
173*d5c09012SAndroid Build Coastguard Worker  // ID>/agent/environments/<Environment ID>`
174*d5c09012SAndroid Build Coastguard Worker  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
175*d5c09012SAndroid Build Coastguard Worker
176*d5c09012SAndroid Build Coastguard Worker  // Optional. The developer-provided description for this environment.
177*d5c09012SAndroid Build Coastguard Worker  // The maximum length is 500 characters. If exceeded, the request is rejected.
178*d5c09012SAndroid Build Coastguard Worker  string description = 2 [(google.api.field_behavior) = OPTIONAL];
179*d5c09012SAndroid Build Coastguard Worker
180*d5c09012SAndroid Build Coastguard Worker  // Optional. The agent version loaded into this environment.
181*d5c09012SAndroid Build Coastguard Worker  // Supported formats:
182*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/agent/versions/<Version ID>`
183*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
184*d5c09012SAndroid Build Coastguard Worker  // ID>`
185*d5c09012SAndroid Build Coastguard Worker  string agent_version = 3 [
186*d5c09012SAndroid Build Coastguard Worker    (google.api.field_behavior) = OPTIONAL,
187*d5c09012SAndroid Build Coastguard Worker    (google.api.resource_reference) = {
188*d5c09012SAndroid Build Coastguard Worker      type: "dialogflow.googleapis.com/Version"
189*d5c09012SAndroid Build Coastguard Worker    }
190*d5c09012SAndroid Build Coastguard Worker  ];
191*d5c09012SAndroid Build Coastguard Worker
192*d5c09012SAndroid Build Coastguard Worker  // Output only. The state of this environment. This field is read-only, i.e.,
193*d5c09012SAndroid Build Coastguard Worker  // it cannot be set by create and update methods.
194*d5c09012SAndroid Build Coastguard Worker  State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
195*d5c09012SAndroid Build Coastguard Worker
196*d5c09012SAndroid Build Coastguard Worker  // Output only. The last update time of this environment. This field is
197*d5c09012SAndroid Build Coastguard Worker  // read-only, i.e., it cannot be set by create and update methods.
198*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Timestamp update_time = 5
199*d5c09012SAndroid Build Coastguard Worker      [(google.api.field_behavior) = OUTPUT_ONLY];
200*d5c09012SAndroid Build Coastguard Worker
201*d5c09012SAndroid Build Coastguard Worker  // Optional. Text to speech settings for this environment.
202*d5c09012SAndroid Build Coastguard Worker  TextToSpeechSettings text_to_speech_settings = 7
203*d5c09012SAndroid Build Coastguard Worker      [(google.api.field_behavior) = OPTIONAL];
204*d5c09012SAndroid Build Coastguard Worker
205*d5c09012SAndroid Build Coastguard Worker  // Optional. The fulfillment settings to use for this environment.
206*d5c09012SAndroid Build Coastguard Worker  Fulfillment fulfillment = 8 [(google.api.field_behavior) = OPTIONAL];
207*d5c09012SAndroid Build Coastguard Worker}
208*d5c09012SAndroid Build Coastguard Worker
209*d5c09012SAndroid Build Coastguard Worker// Instructs the speech synthesizer on how to generate the output audio content.
210*d5c09012SAndroid Build Coastguard Workermessage TextToSpeechSettings {
211*d5c09012SAndroid Build Coastguard Worker  // Optional. Indicates whether text to speech is enabled. Even when this field
212*d5c09012SAndroid Build Coastguard Worker  // is false, other settings in this proto are still retained.
213*d5c09012SAndroid Build Coastguard Worker  bool enable_text_to_speech = 1 [(google.api.field_behavior) = OPTIONAL];
214*d5c09012SAndroid Build Coastguard Worker
215*d5c09012SAndroid Build Coastguard Worker  // Required. Audio encoding of the synthesized audio content.
216*d5c09012SAndroid Build Coastguard Worker  OutputAudioEncoding output_audio_encoding = 2
217*d5c09012SAndroid Build Coastguard Worker      [(google.api.field_behavior) = REQUIRED];
218*d5c09012SAndroid Build Coastguard Worker
219*d5c09012SAndroid Build Coastguard Worker  // Optional. The synthesis sample rate (in hertz) for this audio. If not
220*d5c09012SAndroid Build Coastguard Worker  // provided, then the synthesizer will use the default sample rate based on
221*d5c09012SAndroid Build Coastguard Worker  // the audio encoding. If this is different from the voice's natural sample
222*d5c09012SAndroid Build Coastguard Worker  // rate, then the synthesizer will honor this request by converting to the
223*d5c09012SAndroid Build Coastguard Worker  // desired sample rate (which might result in worse audio quality).
224*d5c09012SAndroid Build Coastguard Worker  int32 sample_rate_hertz = 3 [(google.api.field_behavior) = OPTIONAL];
225*d5c09012SAndroid Build Coastguard Worker
226*d5c09012SAndroid Build Coastguard Worker  // Optional. Configuration of how speech should be synthesized, mapping from
227*d5c09012SAndroid Build Coastguard Worker  // language (https://cloud.google.com/dialogflow/docs/reference/language) to
228*d5c09012SAndroid Build Coastguard Worker  // SynthesizeSpeechConfig.
229*d5c09012SAndroid Build Coastguard Worker  map<string, SynthesizeSpeechConfig> synthesize_speech_configs = 4
230*d5c09012SAndroid Build Coastguard Worker      [(google.api.field_behavior) = OPTIONAL];
231*d5c09012SAndroid Build Coastguard Worker}
232*d5c09012SAndroid Build Coastguard Worker
233*d5c09012SAndroid Build Coastguard Worker// The request message for
234*d5c09012SAndroid Build Coastguard Worker// [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments].
235*d5c09012SAndroid Build Coastguard Workermessage ListEnvironmentsRequest {
236*d5c09012SAndroid Build Coastguard Worker  // Required. The agent to list all environments from.
237*d5c09012SAndroid Build Coastguard Worker  // Format:
238*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/agent`
239*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/locations/<Location ID>/agent`
240*d5c09012SAndroid Build Coastguard Worker  string parent = 1 [
241*d5c09012SAndroid Build Coastguard Worker    (google.api.field_behavior) = REQUIRED,
242*d5c09012SAndroid Build Coastguard Worker    (google.api.resource_reference) = {
243*d5c09012SAndroid Build Coastguard Worker      child_type: "dialogflow.googleapis.com/Environment"
244*d5c09012SAndroid Build Coastguard Worker    }
245*d5c09012SAndroid Build Coastguard Worker  ];
246*d5c09012SAndroid Build Coastguard Worker
247*d5c09012SAndroid Build Coastguard Worker  // Optional. The maximum number of items to return in a single page. By
248*d5c09012SAndroid Build Coastguard Worker  // default 100 and at most 1000.
249*d5c09012SAndroid Build Coastguard Worker  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
250*d5c09012SAndroid Build Coastguard Worker
251*d5c09012SAndroid Build Coastguard Worker  // Optional. The next_page_token value returned from a previous list request.
252*d5c09012SAndroid Build Coastguard Worker  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
253*d5c09012SAndroid Build Coastguard Worker}
254*d5c09012SAndroid Build Coastguard Worker
255*d5c09012SAndroid Build Coastguard Worker// The response message for
256*d5c09012SAndroid Build Coastguard Worker// [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments].
257*d5c09012SAndroid Build Coastguard Workermessage ListEnvironmentsResponse {
258*d5c09012SAndroid Build Coastguard Worker  // The list of agent environments. There will be a maximum number of items
259*d5c09012SAndroid Build Coastguard Worker  // returned based on the page_size field in the request.
260*d5c09012SAndroid Build Coastguard Worker  repeated Environment environments = 1;
261*d5c09012SAndroid Build Coastguard Worker
262*d5c09012SAndroid Build Coastguard Worker  // Token to retrieve the next page of results, or empty if there are no
263*d5c09012SAndroid Build Coastguard Worker  // more results in the list.
264*d5c09012SAndroid Build Coastguard Worker  string next_page_token = 2;
265*d5c09012SAndroid Build Coastguard Worker}
266*d5c09012SAndroid Build Coastguard Worker
267*d5c09012SAndroid Build Coastguard Worker// The request message for
268*d5c09012SAndroid Build Coastguard Worker// [Environments.GetEnvironment][google.cloud.dialogflow.v2beta1.Environments.GetEnvironment].
269*d5c09012SAndroid Build Coastguard Workermessage GetEnvironmentRequest {
270*d5c09012SAndroid Build Coastguard Worker  // Required. The name of the environment.
271*d5c09012SAndroid Build Coastguard Worker  // Supported formats:
272*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/agent/environments/<Environment ID>`
273*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/locations/<Location
274*d5c09012SAndroid Build Coastguard Worker  //   ID>/agent/environments/<Environment ID>`
275*d5c09012SAndroid Build Coastguard Worker  string name = 1 [
276*d5c09012SAndroid Build Coastguard Worker    (google.api.field_behavior) = REQUIRED,
277*d5c09012SAndroid Build Coastguard Worker    (google.api.resource_reference) = {
278*d5c09012SAndroid Build Coastguard Worker      type: "dialogflow.googleapis.com/Environment"
279*d5c09012SAndroid Build Coastguard Worker    }
280*d5c09012SAndroid Build Coastguard Worker  ];
281*d5c09012SAndroid Build Coastguard Worker}
282*d5c09012SAndroid Build Coastguard Worker
283*d5c09012SAndroid Build Coastguard Worker// The request message for
284*d5c09012SAndroid Build Coastguard Worker// [Environments.CreateEnvironment][google.cloud.dialogflow.v2beta1.Environments.CreateEnvironment].
285*d5c09012SAndroid Build Coastguard Workermessage CreateEnvironmentRequest {
286*d5c09012SAndroid Build Coastguard Worker  // Required. The agent to create an environment for.
287*d5c09012SAndroid Build Coastguard Worker  // Supported formats:
288*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/agent`
289*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/locations/<Location ID>/agent`
290*d5c09012SAndroid Build Coastguard Worker  string parent = 1 [
291*d5c09012SAndroid Build Coastguard Worker    (google.api.field_behavior) = REQUIRED,
292*d5c09012SAndroid Build Coastguard Worker    (google.api.resource_reference) = {
293*d5c09012SAndroid Build Coastguard Worker      child_type: "dialogflow.googleapis.com/Environment"
294*d5c09012SAndroid Build Coastguard Worker    }
295*d5c09012SAndroid Build Coastguard Worker  ];
296*d5c09012SAndroid Build Coastguard Worker
297*d5c09012SAndroid Build Coastguard Worker  // Required. The environment to create.
298*d5c09012SAndroid Build Coastguard Worker  Environment environment = 2 [(google.api.field_behavior) = REQUIRED];
299*d5c09012SAndroid Build Coastguard Worker
300*d5c09012SAndroid Build Coastguard Worker  // Required. The unique id of the new environment.
301*d5c09012SAndroid Build Coastguard Worker  string environment_id = 3 [(google.api.field_behavior) = REQUIRED];
302*d5c09012SAndroid Build Coastguard Worker}
303*d5c09012SAndroid Build Coastguard Worker
304*d5c09012SAndroid Build Coastguard Worker// The request message for
305*d5c09012SAndroid Build Coastguard Worker// [Environments.UpdateEnvironment][google.cloud.dialogflow.v2beta1.Environments.UpdateEnvironment].
306*d5c09012SAndroid Build Coastguard Workermessage UpdateEnvironmentRequest {
307*d5c09012SAndroid Build Coastguard Worker  // Required. The environment to update.
308*d5c09012SAndroid Build Coastguard Worker  Environment environment = 1 [(google.api.field_behavior) = REQUIRED];
309*d5c09012SAndroid Build Coastguard Worker
310*d5c09012SAndroid Build Coastguard Worker  // Required. The mask to control which fields get updated.
311*d5c09012SAndroid Build Coastguard Worker  google.protobuf.FieldMask update_mask = 2
312*d5c09012SAndroid Build Coastguard Worker      [(google.api.field_behavior) = REQUIRED];
313*d5c09012SAndroid Build Coastguard Worker
314*d5c09012SAndroid Build Coastguard Worker  // Optional. This field is used to prevent accidental overwrite of the draft
315*d5c09012SAndroid Build Coastguard Worker  // environment, which is an operation that cannot be undone. To confirm that
316*d5c09012SAndroid Build Coastguard Worker  // the caller desires this overwrite, this field must be explicitly set to
317*d5c09012SAndroid Build Coastguard Worker  // true when updating the draft environment (environment ID = `-`).
318*d5c09012SAndroid Build Coastguard Worker  bool allow_load_to_draft_and_discard_changes = 3
319*d5c09012SAndroid Build Coastguard Worker      [(google.api.field_behavior) = OPTIONAL];
320*d5c09012SAndroid Build Coastguard Worker}
321*d5c09012SAndroid Build Coastguard Worker
322*d5c09012SAndroid Build Coastguard Worker// The request message for
323*d5c09012SAndroid Build Coastguard Worker// [Environments.DeleteEnvironment][google.cloud.dialogflow.v2beta1.Environments.DeleteEnvironment].
324*d5c09012SAndroid Build Coastguard Workermessage DeleteEnvironmentRequest {
325*d5c09012SAndroid Build Coastguard Worker  // Required. The name of the environment to delete.
326*d5c09012SAndroid Build Coastguard Worker  // / Format:
327*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/agent/environments/<Environment ID>`
328*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/locations/<Location
329*d5c09012SAndroid Build Coastguard Worker  // ID>/agent/environments/<Environment ID>`
330*d5c09012SAndroid Build Coastguard Worker  string name = 1 [
331*d5c09012SAndroid Build Coastguard Worker    (google.api.field_behavior) = REQUIRED,
332*d5c09012SAndroid Build Coastguard Worker    (google.api.resource_reference) = {
333*d5c09012SAndroid Build Coastguard Worker      type: "dialogflow.googleapis.com/Environment"
334*d5c09012SAndroid Build Coastguard Worker    }
335*d5c09012SAndroid Build Coastguard Worker  ];
336*d5c09012SAndroid Build Coastguard Worker}
337*d5c09012SAndroid Build Coastguard Worker
338*d5c09012SAndroid Build Coastguard Worker// The request message for
339*d5c09012SAndroid Build Coastguard Worker// [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentHistory].
340*d5c09012SAndroid Build Coastguard Workermessage GetEnvironmentHistoryRequest {
341*d5c09012SAndroid Build Coastguard Worker  // Required. The name of the environment to retrieve history for.
342*d5c09012SAndroid Build Coastguard Worker  // Supported formats:
343*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/agent/environments/<Environment ID>`
344*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/locations/<Location
345*d5c09012SAndroid Build Coastguard Worker  //   ID>/agent/environments/<Environment ID>`
346*d5c09012SAndroid Build Coastguard Worker  string parent = 1 [
347*d5c09012SAndroid Build Coastguard Worker    (google.api.field_behavior) = REQUIRED,
348*d5c09012SAndroid Build Coastguard Worker    (google.api.resource_reference) = {
349*d5c09012SAndroid Build Coastguard Worker      type: "dialogflow.googleapis.com/Environment"
350*d5c09012SAndroid Build Coastguard Worker    }
351*d5c09012SAndroid Build Coastguard Worker  ];
352*d5c09012SAndroid Build Coastguard Worker
353*d5c09012SAndroid Build Coastguard Worker  // Optional. The maximum number of items to return in a single page. By
354*d5c09012SAndroid Build Coastguard Worker  // default 100 and at most 1000.
355*d5c09012SAndroid Build Coastguard Worker  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
356*d5c09012SAndroid Build Coastguard Worker
357*d5c09012SAndroid Build Coastguard Worker  // Optional. The next_page_token value returned from a previous list request.
358*d5c09012SAndroid Build Coastguard Worker  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
359*d5c09012SAndroid Build Coastguard Worker}
360*d5c09012SAndroid Build Coastguard Worker
361*d5c09012SAndroid Build Coastguard Worker// The response message for
362*d5c09012SAndroid Build Coastguard Worker// [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentHistory].
363*d5c09012SAndroid Build Coastguard Workermessage EnvironmentHistory {
364*d5c09012SAndroid Build Coastguard Worker  // Represents an environment history entry.
365*d5c09012SAndroid Build Coastguard Worker  message Entry {
366*d5c09012SAndroid Build Coastguard Worker    // The agent version loaded into this environment history entry.
367*d5c09012SAndroid Build Coastguard Worker    string agent_version = 1;
368*d5c09012SAndroid Build Coastguard Worker
369*d5c09012SAndroid Build Coastguard Worker    // The developer-provided description for this environment history entry.
370*d5c09012SAndroid Build Coastguard Worker    string description = 2;
371*d5c09012SAndroid Build Coastguard Worker
372*d5c09012SAndroid Build Coastguard Worker    // The creation time of this environment history entry.
373*d5c09012SAndroid Build Coastguard Worker    google.protobuf.Timestamp create_time = 3;
374*d5c09012SAndroid Build Coastguard Worker  }
375*d5c09012SAndroid Build Coastguard Worker
376*d5c09012SAndroid Build Coastguard Worker  // Output only. The name of the environment this history is for.
377*d5c09012SAndroid Build Coastguard Worker  // Supported formats:
378*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/agent/environments/<Environment ID>`
379*d5c09012SAndroid Build Coastguard Worker  // - `projects/<Project ID>/locations/<Location
380*d5c09012SAndroid Build Coastguard Worker  //    ID>/agent/environments/<Environment ID>`
381*d5c09012SAndroid Build Coastguard Worker  string parent = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
382*d5c09012SAndroid Build Coastguard Worker
383*d5c09012SAndroid Build Coastguard Worker  // Output only. The list of agent environments. There will be a maximum number
384*d5c09012SAndroid Build Coastguard Worker  // of items returned based on the page_size field in the request.
385*d5c09012SAndroid Build Coastguard Worker  repeated Entry entries = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
386*d5c09012SAndroid Build Coastguard Worker
387*d5c09012SAndroid Build Coastguard Worker  // Output only. Token to retrieve the next page of results, or empty if there
388*d5c09012SAndroid Build Coastguard Worker  // are no more results in the list.
389*d5c09012SAndroid Build Coastguard Worker  string next_page_token = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
390*d5c09012SAndroid Build Coastguard Worker}
391