135 lines
5.1 KiB
135 lines
5.1 KiB
// Copyright 2020 Google LLC |
|
// |
|
// Licensed under the Apache License, Version 2.0 (the "License"); |
|
// you may not use this file except in compliance with the License. |
|
// You may obtain a copy of the License at |
|
// |
|
// http://www.apache.org/licenses/LICENSE-2.0 |
|
// |
|
// Unless required by applicable law or agreed to in writing, software |
|
// distributed under the License is distributed on an "AS IS" BASIS, |
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
// See the License for the specific language governing permissions and |
|
// limitations under the License. |
|
|
|
syntax = "proto3"; |
|
|
|
package google.cloud.dialogflow.v2beta1; |
|
|
|
import "google/api/annotations.proto"; |
|
import "google/api/field_behavior.proto"; |
|
import "google/api/resource.proto"; |
|
import "google/cloud/dialogflow/v2beta1/audio_config.proto"; |
|
import "google/protobuf/empty.proto"; |
|
import "google/protobuf/field_mask.proto"; |
|
import "google/protobuf/timestamp.proto"; |
|
import "google/api/client.proto"; |
|
|
|
option cc_enable_arenas = true; |
|
option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; |
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; |
|
option java_multiple_files = true; |
|
option java_outer_classname = "EnvironmentProto"; |
|
option java_package = "com.google.cloud.dialogflow.v2beta1"; |
|
option objc_class_prefix = "DF"; |
|
|
|
// Manages agent environments. |
|
service Environments { |
|
option (google.api.default_host) = "dialogflow.googleapis.com"; |
|
option (google.api.oauth_scopes) = |
|
"https://www.googleapis.com/auth/cloud-platform," |
|
"https://www.googleapis.com/auth/dialogflow"; |
|
|
|
// Returns the list of all non-draft environments of the specified agent. |
|
rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { |
|
option (google.api.http) = { |
|
get: "/v2beta1/{parent=projects/*/agent}/environments" |
|
additional_bindings { |
|
get: "/v2beta1/{parent=projects/*/locations/*/agent}/environments" |
|
} |
|
}; |
|
} |
|
} |
|
|
|
// Represents an agent environment. |
|
message Environment { |
|
option (google.api.resource) = { |
|
type: "dialogflow.googleapis.com/Environment" |
|
pattern: "projects/{project}/agent/environments/{environment}" |
|
}; |
|
|
|
// Represents an environment state. When a environment is pointed to a new |
|
// agent version, the environment is temporarily set to the `LOADING` state. |
|
// During that time, the environment keeps on serving the previous version of |
|
// the agent. After the new agent version is done loading, the environment is |
|
// set back to the `RUNNING` state. |
|
enum State { |
|
// Not specified. This value is not used. |
|
STATE_UNSPECIFIED = 0; |
|
|
|
// Stopped. |
|
STOPPED = 1; |
|
|
|
// Loading. |
|
LOADING = 2; |
|
|
|
// Running. |
|
RUNNING = 3; |
|
} |
|
|
|
// Output only. The unique identifier of this agent environment. |
|
// Format: `projects/<Project ID>/agent/environments/<Environment ID>`. |
|
// For Environment ID, "-" is reserved for 'draft' environment. |
|
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
|
|
|
// Optional. The developer-provided description for this environment. |
|
// The maximum length is 500 characters. If exceeded, the request is rejected. |
|
string description = 2 [(google.api.field_behavior) = OPTIONAL]; |
|
|
|
// Optional. The agent version loaded into this environment. |
|
// Format: `projects/<Project ID>/agent/versions/<Version ID>`. |
|
string agent_version = 3 [ |
|
(google.api.field_behavior) = OPTIONAL, |
|
(google.api.resource_reference) = { |
|
type: "dialogflow.googleapis.com/Version" |
|
} |
|
]; |
|
|
|
// Output only. The state of this environment. This field is read-only, i.e., it cannot be |
|
// set by create and update methods. |
|
State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; |
|
|
|
// Output only. The last update time of this environment. This field is read-only, i.e., it |
|
// cannot be set by create and update methods. |
|
google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; |
|
} |
|
|
|
// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. |
|
message ListEnvironmentsRequest { |
|
// Required. The agent to list all environments from. |
|
// Format: `projects/<Project ID>/agent`. |
|
string parent = 1 [ |
|
(google.api.field_behavior) = REQUIRED, |
|
(google.api.resource_reference) = { |
|
child_type: "dialogflow.googleapis.com/Environment" |
|
} |
|
]; |
|
|
|
// Optional. The maximum number of items to return in a single page. By default 100 and |
|
// at most 1000. |
|
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; |
|
|
|
// Optional. The next_page_token value returned from a previous list request. |
|
string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; |
|
} |
|
|
|
// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. |
|
message ListEnvironmentsResponse { |
|
// The list of agent environments. There will be a maximum number of items |
|
// returned based on the page_size field in the request. |
|
repeated Environment environments = 1; |
|
|
|
// Token to retrieve the next page of results, or empty if there are no |
|
// more results in the list. |
|
string next_page_token = 2; |
|
}
|
|
|